all: fix go vet warnings

This commit is contained in:
Felix Lange
2016-04-15 11:06:57 +02:00
parent 68c755a238
commit 6fdd0893c3
41 changed files with 83 additions and 93 deletions

View File

@ -57,7 +57,7 @@ func TestCompiler(t *testing.T) {
}
if len(contracts) != 1 {
t.Errorf("one contract expected, got\n%s", len(contracts))
t.Errorf("one contract expected, got %d", len(contracts))
}
if contracts["test"].Code != code {

View File

@ -35,7 +35,7 @@ func TestSum(t *testing.T) {
summer := summer{numbers: []*big.Int{big.NewInt(1), big.NewInt(2), big.NewInt(3)}}
sum := Sum(summer)
if sum.Cmp(big.NewInt(6)) != 0 {
t.Errorf("not 6", sum)
t.Errorf("got sum = %d, want 6", sum)
}
}

View File

@ -34,7 +34,7 @@ func MakeName(name, version string) string {
func ExpandHomePath(p string) (path string) {
path = p
sep := fmt.Sprintf("%s", os.PathSeparator)
sep := string(os.PathSeparator)
// Check in case of paths like "/something/~/something/"
if len(p) > 1 && p[:1+len(sep)] == "~"+sep {