aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 17:06:57 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 17:17:27 +0800
commit6fdd0893c3ebf57e5a9ba2af569c595c859ab902 (patch)
tree2df67265a0350b68b2f10ba2f7dcd292fef59ad0 /common
parent68c755a238f1a204087c2843f01d48fc6039716f (diff)
downloadgo-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.gz
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.bz2
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.lz
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.xz
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.tar.zst
go-tangerine-6fdd0893c3ebf57e5a9ba2af569c595c859ab902.zip
all: fix go vet warnings
Diffstat (limited to 'common')
-rw-r--r--common/compiler/solidity_test.go2
-rw-r--r--common/math/dist_test.go2
-rw-r--r--common/path.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/common/compiler/solidity_test.go b/common/compiler/solidity_test.go
index 258a78f52..7109b1ec4 100644
--- a/common/compiler/solidity_test.go
+++ b/common/compiler/solidity_test.go
@@ -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 {
diff --git a/common/math/dist_test.go b/common/math/dist_test.go
index 1eacfbcaf..826faea8b 100644
--- a/common/math/dist_test.go
+++ b/common/math/dist_test.go
@@ -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)
}
}
diff --git a/common/path.go b/common/path.go
index 75a8c1a3e..cbcd13c4f 100644
--- a/common/path.go
+++ b/common/path.go
@@ -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 {