mirror of
https://github.com/duke-git/lancet.git
synced 2025-10-05 15:36:52 +08:00

* 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
19 lines
253 B
Go
19 lines
253 B
Go
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))
|
|
}
|