go fmt
This commit is contained in:
@@ -54,7 +54,6 @@ func TestIsRequestPresignedSignatureV4(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Tests is requested authenticated function, tests replies for s3 errors.
|
// Tests is requested authenticated function, tests replies for s3 errors.
|
||||||
func TestIsReqAuthenticated(t *testing.T) {
|
func TestIsReqAuthenticated(t *testing.T) {
|
||||||
iam := NewIdentityAccessManagement("", "")
|
iam := NewIdentityAccessManagement("", "")
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ func (c *commandFsMv) Do(args []string, commandEnv *CommandEnv, writer io.Writer
|
|||||||
var targetDir, targetName string
|
var targetDir, targetName string
|
||||||
|
|
||||||
// moving a file or folder
|
// moving a file or folder
|
||||||
if err == nil && respDestinationLookupEntry.Entry!= nil && respDestinationLookupEntry.Entry.IsDirectory {
|
if err == nil && respDestinationLookupEntry.Entry != nil && respDestinationLookupEntry.Entry.IsDirectory {
|
||||||
// to a directory
|
// to a directory
|
||||||
targetDir = filepath.ToSlash(filepath.Join(destinationDir, destinationName))
|
targetDir = filepath.ToSlash(filepath.Join(destinationDir, destinationName))
|
||||||
targetName = sourceName
|
targetName = sourceName
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ func (s *Store) ConfigureVolume(i needle.VolumeId, replication string) error {
|
|||||||
}
|
}
|
||||||
// load, modify, save
|
// load, modify, save
|
||||||
baseFileName := strings.TrimSuffix(fileInfo.Name(), filepath.Ext(fileInfo.Name()))
|
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)
|
volumeInfo, _, err := pb.MaybeLoadVolumeInfo(vifFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("volume %d fail to load vif", i)
|
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) {
|
func (v *Volume) readSuperBlock() (err error) {
|
||||||
v.SuperBlock, err = super_block.ReadSuperBlock(v.DataBackend)
|
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 {
|
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)
|
return fmt.Errorf("Error parse volume %d replication %s : %v", v.Id, v.volumeInfo.Replication, err)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user