Fix travis from tripping on go vet. (#1009)

* Fix travis from tripping on go vet.

* Fix strings from gofmt
This commit is contained in:
J Guerreiro 2019-08-24 23:31:13 +01:00 committed by GitHub
parent c9f7105481
commit 392865f7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@ arch:
- git
- go
script:
- go tool vet .
- go vet .
- diff -u <(echo -n) <(gofmt -d ./)
- make
- make test

View file

@ -663,7 +663,7 @@ func providerMenu(dep string, providers providers) *rpc.Pkg {
}
if num < 1 || num >= size {
fmt.Fprintf(os.Stderr, "%s invalid value: %d is not between %d and %d\n", red("error:"), num, 1, size - 1)
fmt.Fprintf(os.Stderr, "%s invalid value: %d is not between %d and %d\n", red("error:"), num, 1, size-1)
continue
}

View file

@ -1,8 +1,8 @@
package ini
import (
"strings"
"io/ioutil"
"strings"
)
type Callback func(fileName string, line int, section string,
@ -35,7 +35,7 @@ func parse(fileName string, ini string, cb Callback, data interface{}) error {
if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") {
runes := []rune(line)
header = string(runes[1 : len(runes)-1])
if err := cb(fileName, n, header, "", "", data); err != nil {
return err
}