Fix various golangci-lint errors (#2059)

This commit is contained in:
Anton Bretting
2022-02-12 20:28:08 +09:00
committed by GitHub
parent 9a2df3c0a2
commit 2f04831817
29 changed files with 362 additions and 263 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func (c *Context) Exec(command string, args []interface{}, inputs ...string) (st
for i, a := range args {
switch a.(type) {
case string:
strArgs[i] = a.(string)
strArgs[i] = fmt.Sprintf("%v", a)
default:
return "", fmt.Errorf("unexpected type of arg \"%s\" in args %v at index %d", reflect.TypeOf(a), args, i)
}