Dropped/fixed ineffectual assignments after static code analysis.
return fi, err
},
} {
- fi, err := stat(symlinkedDir)
+ _, err := stat(symlinkedDir)
assert.Equal(ErrPermissionSymlink, err)
- fi, err = stat(symlinkedFile)
+ fi, err := stat(symlinkedFile)
assertFileStat(symlinkedFilename, fi, err)
fi, err = stat(filepath.Join(workDir, "blog"))
}
var filename string
- fileExt := helpers.ExtNoDelimiter(configName)
- if fileExt != "" {
+ if helpers.ExtNoDelimiter(configName) != "" {
exists, _ := helpers.Exists(baseFilename, l.Fs)
if exists {
filename = baseFilename
exists, _ := helpers.Exists(filenameToCheck, l.Fs)
if exists {
filename = filenameToCheck
- fileExt = ext
break
}
}
end++
}
- root := filepath.Join(parts[start:end]...)
- if hadSlash {
- root = helpers.FilePathSeparator + root
- }
+ /*
+ root := filepath.Join(parts[start:end]...)
+ if hadSlash {
+ root = helpers.FilePathSeparator + root
+ }
+
+ helpers.PrintFs(fs, root, os.Stdout)
+ */
- //helpers.PrintFs(fs, root, os.Stdout)
t.Fatalf("Failed to read file: %s", err)
}
return string(b)
f, found := formats.FromFilename("my.amp.html")
require.True(t, found)
require.Equal(t, AMPFormat, f)
- f, found = formats.FromFilename("my.ics")
+ _, found = formats.FromFilename("my.ics")
require.True(t, found)
f, found = formats.FromFilename("my.html")
require.True(t, found)
dStr, err := cast.ToStringE(l)
if err != nil {
dLast = nil
+ } else {
+ dLast = &dStr
}
- dLast = &dStr
}
seqv := reflect.ValueOf(seq)