mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 23:17:23 +08:00
go fmt
This commit is contained in:
@@ -358,7 +358,7 @@ func (s *Store) ConfigureVolume(i needle.VolumeId, replication string) error {
|
||||
}
|
||||
// load, modify, save
|
||||
baseFileName := strings.TrimSuffix(fileInfo.Name(), filepath.Ext(fileInfo.Name()))
|
||||
vifFile := filepath.Join(location.Directory, baseFileName + ".vif")
|
||||
vifFile := filepath.Join(location.Directory, baseFileName+".vif")
|
||||
volumeInfo, _, err := pb.MaybeLoadVolumeInfo(vifFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("volume %d fail to load vif", i)
|
||||
|
@@ -37,7 +37,7 @@ func (v *Volume) maybeWriteSuperBlock() error {
|
||||
|
||||
func (v *Volume) readSuperBlock() (err error) {
|
||||
v.SuperBlock, err = super_block.ReadSuperBlock(v.DataBackend)
|
||||
if v.volumeInfo != nil && v.volumeInfo.Replication != ""{
|
||||
if v.volumeInfo != nil && v.volumeInfo.Replication != "" {
|
||||
if replication, err := super_block.NewReplicaPlacementFromString(v.volumeInfo.Replication); err != nil {
|
||||
return fmt.Errorf("Error parse volume %d replication %s : %v", v.Id, v.volumeInfo.Replication, err)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user