diff --git a/dump/dumper_test.go b/dump/dumper_test.go index 3015ee442..da3be3cee 100644 --- a/dump/dumper_test.go +++ b/dump/dumper_test.go @@ -194,6 +194,7 @@ func TestDumper_AccessCantExportedField(_ *testing.T) { func TestDumper_AccessCantExportedField1(t *testing.T) { // init a nested struct s1 := st1{st0{2}, 23, "inhere"} + assert.Eq(t, "inhere", s1.Name) myS1 := struct { // cannotExport any // ok cannotExport st1 // ok @@ -232,7 +233,7 @@ func TestDump_Map(t *testing.T) { Print(m4) } -func TestMap_Simpled(t *testing.T) { +func TestMap_Simpled(_ *testing.T) { m1 := map[int]int{ 23: 12, 24: 13, @@ -290,6 +291,7 @@ func TestMap_Simpled(t *testing.T) { func TestMap_InterfaceNested(t *testing.T) { s1 := st1{st0{2}, 23, "inhere"} + assert.Eq(t, "inhere", s1.Name) m1 := map[string]any{ "key1": 112, "key2": uint(112), diff --git a/encodes/encodes.go b/encodes/encodes.go index 306325ea2..68da3bcfc 100644 --- a/encodes/encodes.go +++ b/encodes/encodes.go @@ -1,3 +1,4 @@ +// Package encodes provide some util for encode/decode data package encodes import ( diff --git a/encodes/hashutil/hashutil.go b/encodes/hashutil/hashutil.go index 7b7b7c4fb..c8efecfa0 100644 --- a/encodes/hashutil/hashutil.go +++ b/encodes/hashutil/hashutil.go @@ -1,3 +1,4 @@ +// Package hashutil provide some util for quickly generate hash package hashutil import ( diff --git a/func.go b/func.go index 285e83fac..a68a41881 100644 --- a/func.go +++ b/func.go @@ -46,7 +46,7 @@ func SafeRun(fn func()) (err error) { return nil } -// SafeRun sync run a func with error. +// SafeRunWithError sync run a func with error. // If the func panics, the panic value is returned as an error. func SafeRunWithError(fn func() error) (err error) { defer func() {