update struct name to uppercase
This commit is contained in:
parent
b80ac583a1
commit
fd11449a05
@ -48,11 +48,14 @@ func getHeaders(token ...interface{}) map[string]string {
|
|||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
type channelItem struct {
|
// ChannelItem -
|
||||||
|
type ChannelItem struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Sinppet channelSinppet `json:"sinppet"`
|
Sinppet ChannelSinppet `json:"sinppet"`
|
||||||
}
|
}
|
||||||
type channelSinppet struct {
|
|
||||||
|
// ChannelSinppet -
|
||||||
|
type ChannelSinppet struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
CustomURL string `json:"customUrl"`
|
CustomURL string `json:"customUrl"`
|
||||||
@ -100,7 +103,7 @@ func QueryYoutubeName(id string) (n string, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apiRes := struct {
|
apiRes := struct {
|
||||||
Items []channelItem `json:"items"`
|
Items []ChannelItem `json:"items"`
|
||||||
}{}
|
}{}
|
||||||
|
|
||||||
err = json.Unmarshal(bodyBytes, &apiRes)
|
err = json.Unmarshal(bodyBytes, &apiRes)
|
||||||
|
Loading…
Reference in New Issue
Block a user