Browse Source

go fmt

pull/1135/head
Chris Lu 5 years ago
parent
commit
e4c63ff2f8
  1. 2
      weed/storage/backend/memory_map/memory_map_backend.go
  2. 6
      weed/storage/backend/s3_backend/s3_sessions.go

2
weed/storage/backend/memory_map/memory_map_backend.go

@ -50,7 +50,7 @@ func (mmf *MemoryMappedFile) Close() error {
func (mmf *MemoryMappedFile) GetStat() (datSize int64, modTime time.Time, err error) {
stat, e := mmf.mm.File.Stat()
if e == nil {
return mmf.mm.End_of_file+1, stat.ModTime(), nil
return mmf.mm.End_of_file + 1, stat.ModTime(), nil
}
return 0, time.Time{}, err
}

6
weed/storage/backend/s3_backend/s3_sessions.go

@ -12,7 +12,7 @@ import (
)
var (
s3Sessions = make(map[string]s3iface.S3API)
s3Sessions = make(map[string]s3iface.S3API)
sessionsLock sync.RWMutex
)
@ -45,10 +45,10 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region string) (s3iface.S
return nil, fmt.Errorf("create aws session in region %s: %v", region, err)
}
t:= s3.New(sess)
t := s3.New(sess)
s3Sessions[region] = t
return t, nil
}
}
Loading…
Cancel
Save