04 2021 档案
摘要:package main import ( "fmt" "sort" ) type SortByGszzl []map[string]string // 设置自定义类型 // 一个内置的排序算法需要知道三个东西: // 1.序列的长度, Len // 2.表示两个元素比较的结果,Less // 3.
阅读全文
摘要:package main import ( "fmt" "log" "gopkg.in/yaml.v2" ) func test_parse_yaml() { data := []byte(` name: GOLANG say: f: hello b: world say2: - f: hello
阅读全文
摘要:package main import ( "encoding/json" "fmt" "log" ) var json_data = []byte(` { "name" : "Golang", "say" : ["Hello", "World!"] } `) type Data struct {
阅读全文

浙公网安备 33010602011771号