From 540441fd385cf28b8065a683f88348f88e78f6b7 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 28 Feb 2021 20:34:14 -0800 Subject: [PATCH] go fmt --- weed/command/filer_backup.go | 1 - weed/replication/sink/azuresink/azure_sink.go | 2 +- weed/replication/sink/b2sink/b2_sink.go | 10 +++++----- weed/replication/sink/filersink/filer_sink.go | 4 ++-- weed/replication/sink/gcssink/gcs_sink.go | 10 +++++----- weed/storage/needle/needle_read_write.go | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/weed/command/filer_backup.go b/weed/command/filer_backup.go index 8cb7441f6..888b46fe7 100644 --- a/weed/command/filer_backup.go +++ b/weed/command/filer_backup.go @@ -155,4 +155,3 @@ func doFilerBackup(grpcDialOption grpc.DialOption, backupOption *FilerBackupOpti }) } - diff --git a/weed/replication/sink/azuresink/azure_sink.go b/weed/replication/sink/azuresink/azure_sink.go index 865f1b25c..d13a1049b 100644 --- a/weed/replication/sink/azuresink/azure_sink.go +++ b/weed/replication/sink/azuresink/azure_sink.go @@ -42,7 +42,7 @@ func (g *AzureSink) IsIncremental() bool { } func (g *AzureSink) Initialize(configuration util.Configuration, prefix string) error { - g.isIncremental = configuration.GetBool(prefix+"is_incremental") + g.isIncremental = configuration.GetBool(prefix + "is_incremental") return g.initialize( configuration.GetString(prefix+"account_name"), configuration.GetString(prefix+"account_key"), diff --git a/weed/replication/sink/b2sink/b2_sink.go b/weed/replication/sink/b2sink/b2_sink.go index 8738231d5..90a0bb2e8 100644 --- a/weed/replication/sink/b2sink/b2_sink.go +++ b/weed/replication/sink/b2sink/b2_sink.go @@ -14,10 +14,10 @@ import ( ) type B2Sink struct { - client *b2.Client - bucket string - dir string - filerSource *source.FilerSource + client *b2.Client + bucket string + dir string + filerSource *source.FilerSource isIncremental bool } @@ -38,7 +38,7 @@ func (g *B2Sink) IsIncremental() bool { } func (g *B2Sink) Initialize(configuration util.Configuration, prefix string) error { - g.isIncremental = configuration.GetBool(prefix+"is_incremental") + g.isIncremental = configuration.GetBool(prefix + "is_incremental") return g.initialize( configuration.GetString(prefix+"b2_account_id"), configuration.GetString(prefix+"b2_master_application_key"), diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go index 4165e87be..d7c5fccc3 100644 --- a/weed/replication/sink/filersink/filer_sink.go +++ b/weed/replication/sink/filersink/filer_sink.go @@ -30,7 +30,7 @@ type FilerSink struct { grpcDialOption grpc.DialOption address string writeChunkByFiler bool - isIncremental bool + isIncremental bool } func init() { @@ -50,7 +50,7 @@ func (fs *FilerSink) IsIncremental() bool { } func (fs *FilerSink) Initialize(configuration util.Configuration, prefix string) error { - fs.isIncremental = configuration.GetBool(prefix+"is_incremental") + fs.isIncremental = configuration.GetBool(prefix + "is_incremental") return fs.DoInitialize( "", configuration.GetString(prefix+"grpcAddress"), diff --git a/weed/replication/sink/gcssink/gcs_sink.go b/weed/replication/sink/gcssink/gcs_sink.go index 02f482862..5cf5b7317 100644 --- a/weed/replication/sink/gcssink/gcs_sink.go +++ b/weed/replication/sink/gcssink/gcs_sink.go @@ -18,10 +18,10 @@ import ( ) type GcsSink struct { - client *storage.Client - bucket string - dir string - filerSource *source.FilerSource + client *storage.Client + bucket string + dir string + filerSource *source.FilerSource isIncremental bool } @@ -42,7 +42,7 @@ func (g *GcsSink) IsIncremental() bool { } func (g *GcsSink) Initialize(configuration util.Configuration, prefix string) error { - g.isIncremental = configuration.GetBool(prefix+"is_incremental") + g.isIncremental = configuration.GetBool(prefix + "is_incremental") return g.initialize( configuration.GetString(prefix+"google_application_credentials"), configuration.GetString(prefix+"bucket"), diff --git a/weed/storage/needle/needle_read_write.go b/weed/storage/needle/needle_read_write.go index 0f72bc0bb..e51df955e 100644 --- a/weed/storage/needle/needle_read_write.go +++ b/weed/storage/needle/needle_read_write.go @@ -168,7 +168,7 @@ func ReadNeedleBlob(r backend.BackendStorageFile, offset int64, size Size, versi } if err != nil { fileSize, _, _ := r.GetStat() - println("n",n, "dataSize", dataSize, "offset", offset, "fileSize", fileSize) + println("n", n, "dataSize", dataSize, "offset", offset, "fileSize", fileSize) } return dataSlice, err