Closed OddCN closed 6 years ago
user can use code below, to parse the result of listdDns()
the func ParseListDnsResp(response["body"]) will return a slice of BareMetalInfo
func ParseListDnsResp(response["body"])
BareMetalInfo is a struct
listDnsResp, err := vultrdns.ParseListDnsResp(response["body"]) if err != nil { fmt.Println(err) return } for _, dns := range listDnsResp { fmt.Printf("%+v\n", dns) } fmt.Println(listDnsResp[0].Data) fmt.Println(listDnsResp[0].Name) fmt.Println(listDnsResp[0].Priority) fmt.Println(listDnsResp[0].RecordID)
int this PR, implemented
and updated examples doc
user can use code below, to parse the result of listdDns()
the
func ParseListDnsResp(response["body"])
will return a slice of BareMetalInfoBareMetalInfo is a struct
int this PR, implemented
and updated examples doc