Go fmt'ed files

This commit is contained in:
mariusor 2021-11-12 18:26:50 +01:00
parent bd0dbddb26
commit 5064eea988
22 changed files with 88 additions and 88 deletions

View file

@ -136,9 +136,12 @@ func deepValueEqual(t canErrorFunc, v1, v2 reflect.Value, visited map[visit]bool
case reflect.Struct:
for i, n := 0, v1.NumField(); i < n; i++ {
var (
f1 = v1.Field(i); f2 = v2.Field(i)
n1 = v1.Type().Field(i).Name; n2 = v2.Type().Field(i).Name
t1 = f1.Type().Name(); t2 = f2.Type().Name()
f1 = v1.Field(i)
f2 = v2.Field(i)
n1 = v1.Type().Field(i).Name
n2 = v2.Type().Field(i).Name
t1 = f1.Type().Name()
t2 = f2.Type().Name()
)
if !deepValueEqual(t, v1.Field(i), v2.Field(i), visited, depth+1) {
t("Struct fields at pos %d %s[%s] and %s[%s] are not deeply equal", i, n1, t1, n2, t2)

View file

@ -26,7 +26,6 @@ func (e *gobEncoder) encode (it Item) ([]byte, error) {
return e.w.Bytes(), nil
}
//// GobEncode
//func GobEncode(it Item) ([]byte, error) {
// w := bytes.NewBuffer(make([]byte, 0))

View file

@ -473,7 +473,6 @@ func TestSource_UnmarshalJSON(t *testing.T) {
func TestGetAPSource(t *testing.T) {
data := []byte(`{"source": {"content": "test", "mediaType": "text/plain" }}`)
par := fastjson.Parser{}
val, _ := par.ParseBytes(data)
a := GetAPSource(val)

View file

@ -55,7 +55,6 @@ func TestQuestion_GetType(t *testing.T) {
}
}
func TestToQuestion(t *testing.T) {
var it Item
act := QuestionNew("test")