Browse Source

go fmt

pull/1794/head
Chris Lu 4 years ago
parent
commit
1bf22c0b5b
  1. 1
      weed/filer/filer_deletion.go
  2. 1
      weed/s3api/auth_credentials.go
  3. 1
      weed/s3api/s3_constants/s3_actions.go
  4. 2
      weed/shell/command_volume_server_evacuate.go
  5. 2
      weed/storage/volume_loading.go

1
weed/filer/filer_deletion.go

@ -151,4 +151,3 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
}
f.DeleteChunks(toDelete)
}

1
weed/s3api/auth_credentials.go

@ -79,7 +79,6 @@ func (iam *IdentityAccessManagement) loadS3ApiConfigurationFromBytes(content []b
return nil
}
func (iam *IdentityAccessManagement) loadS3ApiConfiguration(config *iam_pb.S3ApiConfiguration) error {
var identities []*Identity
for _, ident := range config.Identities {

1
weed/s3api/s3_constants/s3_actions.go

@ -7,4 +7,3 @@ const (
ACTION_TAGGING = "Tagging"
ACTION_LIST = "List"
)

2
weed/shell/command_volume_server_evacuate.go

@ -175,7 +175,7 @@ func moveAwayOneEcVolume(commandEnv *CommandEnv, ecShardInfo *master_pb.VolumeEc
func moveAwayOneNormalVolume(commandEnv *CommandEnv, volumeReplicas map[uint32][]*VolumeReplica, vol *master_pb.VolumeInformationMessage, thisNode *Node, otherNodes []*Node, applyChange bool) (hasMoved bool, err error) {
sort.Slice(otherNodes, func(i, j int) bool {
return otherNodes[i].localVolumeRatio(capacityByMaxVolumeCount) + otherNodes[i].localVolumeRatio(capacityByMaxSsdVolumeCount) < otherNodes[j].localVolumeRatio(capacityByMaxVolumeCount) + otherNodes[j].localVolumeRatio(capacityByMaxSsdVolumeCount)
return otherNodes[i].localVolumeRatio(capacityByMaxVolumeCount)+otherNodes[i].localVolumeRatio(capacityByMaxSsdVolumeCount) < otherNodes[j].localVolumeRatio(capacityByMaxVolumeCount)+otherNodes[j].localVolumeRatio(capacityByMaxSsdVolumeCount)
})
for i := 0; i < len(otherNodes); i++ {

2
weed/storage/volume_loading.go

@ -92,7 +92,7 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
if err == nil && alsoLoadIndex {
// adjust for existing volumes with .idx together with .dat files
if v.dirIdx != v.dir {
if util.FileExists(v.DataFileName()+".idx") {
if util.FileExists(v.DataFileName() + ".idx") {
v.dirIdx = v.dir
}
}

Loading…
Cancel
Save