Browse Source

go fmt

pull/1862/head
Chris Lu 4 years ago
parent
commit
540441fd38
  1. 1
      weed/command/filer_backup.go
  2. 2
      weed/replication/sink/azuresink/azure_sink.go
  3. 10
      weed/replication/sink/b2sink/b2_sink.go
  4. 4
      weed/replication/sink/filersink/filer_sink.go
  5. 10
      weed/replication/sink/gcssink/gcs_sink.go
  6. 2
      weed/storage/needle/needle_read_write.go

1
weed/command/filer_backup.go

@ -155,4 +155,3 @@ func doFilerBackup(grpcDialOption grpc.DialOption, backupOption *FilerBackupOpti
})
}

2
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"),

10
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"),

4
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"),

10
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"),

2
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

Loading…
Cancel
Save