fix typos;

remove unnecessary tests;
go fmt -s
This commit is contained in:
Murat Kabilov
2017-06-08 15:52:01 +02:00
committed by Oleksii Kliukin
parent e104a67260
commit 1540a2ba65
6 changed files with 18 additions and 34 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ func (t *API) TeamInfo(teamID, token string) (tm *team, er error) {
return nil, err
}
defer func() {
if err:= resp.Body.Close(); err != nil {
if err := resp.Body.Close(); err != nil {
er = fmt.Errorf("error when closing response; %v", err)
tm = nil
}
-16
View File
@@ -1,7 +1,6 @@
package util
import (
"fmt"
"reflect"
"testing"
@@ -26,13 +25,6 @@ var pgUsers = []struct {
MemberOf: []string{}},
"md592f413f3974bdf3799bb6fecb5f9f2c6"}}
var prettyTest = []struct {
in interface{}
out string
}{
{pgUsers, `[{{test password [] []} md587f77988ccb5aa917c93201ba314fcd4} {{test md592f413f3974bdf3799bb6fecb5f9f2c6 [] []} md592f413f3974bdf3799bb6fecb5f9f2c6}]`},
}
var prettyDiffTest = []struct {
inA interface{}
inB interface{}
@@ -86,14 +78,6 @@ func TestPGUserPassword(t *testing.T) {
}
}
func TestPretty(t *testing.T) {
for _, tt := range prettyTest {
if actual := Pretty(tt.in); fmt.Sprintf("%v", actual) != tt.out {
t.Errorf("Pretty expected: %s, got: %s", tt.out, actual)
}
}
}
func TestPrettyDiff(t *testing.T) {
for _, tt := range prettyDiffTest {
if actual := PrettyDiff(tt.inA, tt.inB); actual != tt.out {