From 2914e4dd6bf2b4fe7bcd4f8ea9acfe20672c2253 Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Wed, 19 Dec 2018 01:02:23 +0800 Subject: [PATCH] make fmt --- pkg/compute/tasks/disk_reset_task.go | 2 +- pkg/hostimage/doc.go | 1 + pkg/scheduler/algorithm/plugin/doc.go | 1 + pkg/scheduler/core/score/doc.go | 1 + pkg/util/aws/keypair_test.go | 6 +++--- 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 pkg/hostimage/doc.go create mode 100644 pkg/scheduler/algorithm/plugin/doc.go create mode 100644 pkg/scheduler/core/score/doc.go diff --git a/pkg/compute/tasks/disk_reset_task.go b/pkg/compute/tasks/disk_reset_task.go index ae6f7da2b4..9c2b2cb447 100644 --- a/pkg/compute/tasks/disk_reset_task.go +++ b/pkg/compute/tasks/disk_reset_task.go @@ -87,7 +87,7 @@ func (self *DiskResetTask) OnRequestResetDisk(ctx context.Context, disk *models. snapshot := iSnapshot.(*models.SSnapshot) externalId, _ := data.GetString("exteranl_disk_id") - if disk.DiskSize != snapshot.Size || (len(externalId) > 0 && externalId != disk.GetExternalId() ){ + if disk.DiskSize != snapshot.Size || (len(externalId) > 0 && externalId != disk.GetExternalId()) { _, err := models.DiskManager.TableSpec().Update(disk, func() error { disk.DiskSize = snapshot.Size disk.ExternalId = externalId diff --git a/pkg/hostimage/doc.go b/pkg/hostimage/doc.go new file mode 100644 index 0000000000..0085e3761d --- /dev/null +++ b/pkg/hostimage/doc.go @@ -0,0 +1 @@ +package hostimage // import "yunion.io/x/onecloud/pkg/hostimage" diff --git a/pkg/scheduler/algorithm/plugin/doc.go b/pkg/scheduler/algorithm/plugin/doc.go new file mode 100644 index 0000000000..52b9c1b7c6 --- /dev/null +++ b/pkg/scheduler/algorithm/plugin/doc.go @@ -0,0 +1 @@ +package plugin // import "yunion.io/x/onecloud/pkg/scheduler/algorithm/plugin" diff --git a/pkg/scheduler/core/score/doc.go b/pkg/scheduler/core/score/doc.go new file mode 100644 index 0000000000..275e8fb863 --- /dev/null +++ b/pkg/scheduler/core/score/doc.go @@ -0,0 +1 @@ +package score // import "yunion.io/x/onecloud/pkg/scheduler/core/score" diff --git a/pkg/util/aws/keypair_test.go b/pkg/util/aws/keypair_test.go index 52477768f5..737f286cb3 100644 --- a/pkg/util/aws/keypair_test.go +++ b/pkg/util/aws/keypair_test.go @@ -3,7 +3,7 @@ package aws import "testing" type testPublicKey struct { - publickey string + publickey string fingerprint string } @@ -22,9 +22,9 @@ func TestMd5Fingerprint(t *testing.T) { continue } - if fingerprint != k.fingerprint { + if fingerprint != k.fingerprint { t.Errorf("ssh-rsa fingerprint is not as expected.%s != %s", fingerprint, k.fingerprint) continue } - } + } }