Skip to content

Commit

Permalink
📝 doc: add package comments for some subpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Dec 8, 2023
1 parent 4eb9721 commit a49dc1c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dump/dumper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions encodes/encodes.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package encodes provide some util for encode/decode data
package encodes

import (
Expand Down
1 change: 1 addition & 0 deletions encodes/hashutil/hashutil.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package hashutil provide some util for quickly generate hash
package hashutil

import (
Expand Down
2 changes: 1 addition & 1 deletion func.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit a49dc1c

Please sign in to comment.