摘要:
序列化 package main import ( "encoding/json" "fmt" ) type User struct { Name string `json:"用户名"`//反射机制 Age int `json:"年龄"` Sex string `json:"性别"` } func 阅读全文
摘要:
package main import ( "fmt" "sort"//第一步 ) type User struct { Name string Age int } //第二步 type Us []User //第三步 func(u Us) Len() int{ return len(u) } // 阅读全文