all: fix go-critic linter suggestions

This commit is contained in:
Oleg Kovalov
2018-08-06 21:14:03 +01:00
committed by Nick Craig-Wood
parent 44abf6473e
commit 06c9f76cd2
24 changed files with 66 additions and 66 deletions
+2 -2
View File
@@ -932,7 +932,7 @@ func NewRemoteName() (name string) {
// editOptions edits the options. If new is true then it just allows
// entry and doesn't show any old values.
func editOptions(ri *fs.RegInfo, name string, new bool) {
func editOptions(ri *fs.RegInfo, name string, isNew bool) {
hasAdvanced := false
for _, advanced := range []bool{false, true} {
if advanced {
@@ -951,7 +951,7 @@ func editOptions(ri *fs.RegInfo, name string, new bool) {
}
subProvider := getConfigData().MustValue(name, fs.ConfigProvider, "")
if matchProvider(option.Provider, subProvider) {
if !new {
if !isNew {
fmt.Printf("Value %q = %q\n", option.Name, FileGet(name, option.Name))
fmt.Printf("Edit? (y/n)>\n")
if !Confirm() {