caniuse/struct.go

56 lines
1.8 KiB
Go
Raw Normal View History

package main
type Data struct {
Eras map[string]string `json:"eras"`
Agents map[string]browser `json:"agents"`
Statuses map[string]string `json:"statuses"`
Cats map[string][]string `json:"cats"`
Data map[string]data `json:"data"`
}
type browser struct {
Browser string `json:"browser"`
LongName string `json:"long_name"`
Abbr string `json:"abbr"`
Prefix string `json:"prefix"`
Type string `json:"type"`
UsageGlobal map[string]float64 `json:"usage_global"`
Versions []string `json:"versions"`
}
type support string
func (s support) Bool() bool {
return s == "y"
}
type data struct {
Title string `json:"title"`
Description string `json:"description"`
Spec string `json:"spec"`
Status string `json:"status"`
Links []struct {
URL string `json:"url"`
Title string `json:"title"`
} `json:"links"`
Categories []string `json:"categories"`
Stats map[string]map[string]support `json:"stats"`
Notes string `json:"notes"`
NotesByNum map[string]string `json:"notes_by_num"`
UsagePercY float64 `json:"usage_perc_y"`
UsagePercA float64 `json:"usage_perc_a"`
UCPrefix bool `json:"ucprefix"`
Parent string `json:"parent"`
Keywords string `json:"keywords"`
IEID string `json:"ie_id"`
ChromeID string `json:"chrome_id"`
FirefoxID string `json:"firefox_id"`
WebkitID string `json:"webkit_id"`
}
type browserStat struct {
version string
support support
usage float64
}