build/vet: Fix all the shadowing reports with go1.6

Golang 1.6 is default version for the build now.

Additionally set 'GODEBUG=cgocheck=0' for now, until
we fix the erasure coding package.

Readmore here https://tip.golang.org/doc/go1.6#cgo
This commit is contained in:
Harshavardhana
2016-02-18 17:16:41 -08:00
parent 04424ae9c2
commit 408aa72146
13 changed files with 77 additions and 34 deletions

View File

@@ -85,8 +85,8 @@ func FileCreateWithPrefix(filePath string, prefix string) (*File, error) {
if err != nil {
return nil, err
}
if err := os.Chmod(f.Name(), 0600); err != nil {
if err := os.Remove(f.Name()); err != nil {
if err = os.Chmod(f.Name(), 0600); err != nil {
if err = os.Remove(f.Name()); err != nil {
return nil, err
}
return nil, err