feat:优化项目信息
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sort"
|
||||
"testing"
|
||||
@ -107,3 +108,19 @@ func TestCode(t *testing.T) {
|
||||
t.Log(lengthOfLongestSubstring("dvdf"))
|
||||
|
||||
}
|
||||
|
||||
type ABC struct {
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
func publish(src []*ABC) {
|
||||
src[1].Key = "测试"
|
||||
}
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
src := []*ABC{&ABC{}, &ABC{}}
|
||||
publish(src)
|
||||
|
||||
_bytes, _ := json.Marshal(src)
|
||||
t.Log(string(_bytes))
|
||||
}
|
||||
|
Reference in New Issue
Block a user