1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-07 14:12:28 +08:00

[StructUtil] add support that the Struct can nest any type to transform (#80)

* add support json tag attribute for StructToMap function

* add the structutil to provide more rich functions and fixed #77

* add support that the nested struct to map for structutil

* recover code

* add structutil unit test

* [StructUtil] add unit test
This commit is contained in:
zm
2023-03-15 14:26:34 +08:00
committed by GitHub
parent ef1e548dfc
commit 2d2c277090
9 changed files with 473 additions and 20 deletions

18
pointer/pointer_test.go Normal file
View File

@@ -0,0 +1,18 @@
package pointer
import (
"github.com/duke-git/lancet/v2/internal"
"testing"
)
func TestExtractPointer(t *testing.T) {
assert := internal.NewAssert(t, "TestExtractPointer")
a := 1
b := &a
c := &b
d := &c
assert.Equal(1, ExtractPointer(d))
}