Browse Source

go fmt

pull/1960/head
Chris Lu 4 years ago
parent
commit
8e404a1433
  1. 2
      weed/command/volume.go
  2. 2
      weed/filer/mysql/mysql_store.go
  3. 2
      weed/filer/mysql2/mysql2_store.go
  4. 2
      weed/filer/postgres/postgres_store.go
  5. 2
      weed/filer/postgres2/postgres2_store.go
  6. 2
      weed/server/filer_server_handlers_write_autochunk.go
  7. 2
      weed/storage/needle/needle_read_write.go

2
weed/command/volume.go

@ -239,7 +239,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
*v.fixJpgOrientation, *v.readRedirect, *v.fixJpgOrientation, *v.readRedirect,
*v.compactionMBPerSecond, *v.compactionMBPerSecond,
*v.fileSizeLimitMB, *v.fileSizeLimitMB,
int64(*v.concurrentUploadLimitMB) * 1024 * 1024,
int64(*v.concurrentUploadLimitMB)*1024*1024,
) )
// starting grpc server // starting grpc server
grpcS := v.startGrpcService(volumeServer) grpcS := v.startGrpcService(volumeServer)

2
weed/filer/mysql/mysql_store.go

@ -49,7 +49,7 @@ func (store *MysqlStore) initialize(upsertQuery string, enableUpsert bool, user,
store.SupportBucketTable = false store.SupportBucketTable = false
if !enableUpsert { if !enableUpsert {
upsertQuery = ""
upsertQuery = ""
} }
store.SqlGenerator = &SqlGenMysql{ store.SqlGenerator = &SqlGenMysql{
CreateTableSqlTemplate: "", CreateTableSqlTemplate: "",

2
weed/filer/mysql2/mysql2_store.go

@ -51,7 +51,7 @@ func (store *MysqlStore2) initialize(createTable, upsertQuery string, enableUpse
store.SupportBucketTable = true store.SupportBucketTable = true
if !enableUpsert { if !enableUpsert {
upsertQuery = ""
upsertQuery = ""
} }
store.SqlGenerator = &mysql.SqlGenMysql{ store.SqlGenerator = &mysql.SqlGenMysql{
CreateTableSqlTemplate: createTable, CreateTableSqlTemplate: createTable,

2
weed/filer/postgres/postgres_store.go

@ -48,7 +48,7 @@ func (store *PostgresStore) initialize(upsertQuery string, enableUpsert bool, us
store.SupportBucketTable = false store.SupportBucketTable = false
if !enableUpsert { if !enableUpsert {
upsertQuery = ""
upsertQuery = ""
} }
store.SqlGenerator = &SqlGenPostgres{ store.SqlGenerator = &SqlGenPostgres{
CreateTableSqlTemplate: "", CreateTableSqlTemplate: "",

2
weed/filer/postgres2/postgres2_store.go

@ -51,7 +51,7 @@ func (store *PostgresStore2) initialize(createTable, upsertQuery string, enableU
store.SupportBucketTable = true store.SupportBucketTable = true
if !enableUpsert { if !enableUpsert {
upsertQuery = ""
upsertQuery = ""
} }
store.SqlGenerator = &postgres.SqlGenPostgres{ store.SqlGenerator = &postgres.SqlGenPostgres{
CreateTableSqlTemplate: createTable, CreateTableSqlTemplate: createTable,

2
weed/server/filer_server_handlers_write_autochunk.go

@ -55,7 +55,7 @@ func (fs *FilerServer) autoChunk(ctx context.Context, w http.ResponseWriter, r *
if err != nil { if err != nil {
if strings.HasPrefix(err.Error(), "read input:") { if strings.HasPrefix(err.Error(), "read input:") {
writeJsonError(w, r, 499, err) writeJsonError(w, r, 499, err)
}else if strings.HasSuffix(err.Error(), "is a file") {
} else if strings.HasSuffix(err.Error(), "is a file") {
writeJsonError(w, r, http.StatusConflict, err) writeJsonError(w, r, http.StatusConflict, err)
} else { } else {
writeJsonError(w, r, http.StatusInternalServerError, err) writeJsonError(w, r, http.StatusInternalServerError, err)

2
weed/storage/needle/needle_read_write.go

@ -173,7 +173,7 @@ func WriteNeedleBlob(w backend.BackendStorageFile, dataSlice []byte, size Size,
if version == Version3 { if version == Version3 {
tsOffset := NeedleHeaderSize + size + NeedleChecksumSize tsOffset := NeedleHeaderSize + size + NeedleChecksumSize
util.Uint64toBytes(dataSlice[tsOffset : tsOffset+TimestampSize], appendAtNs)
util.Uint64toBytes(dataSlice[tsOffset:tsOffset+TimestampSize], appendAtNs)
} }
if err == nil { if err == nil {

Loading…
Cancel
Save