ymt/utils/sort_struct_test.go

20 lines
289 B
Go

package utils
import (
"testing"
)
func TestSortStruct(t *testing.T) {
data := &struct {
Name string `json:"name"`
Filed1 string `json:"filed1"`
Filed2 string `json:"filed2"`
}{
Name: "test",
Filed1: "filed1",
Filed2: "filed2",
}
kv := SortStruct(data)
t.Log(kv)
}