2022-10-06 04:15:56 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
type Data struct {
|
2022-10-07 04:44:11 +00:00
|
|
|
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"`
|
2022-10-06 04:15:56 +00:00
|
|
|
}
|
|
|
|
|
2022-10-07 04:44:11 +00:00
|
|
|
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
|
2022-10-06 04:15:56 +00:00
|
|
|
|
2022-10-07 04:44:11 +00:00
|
|
|
func (s support) Bool() bool {
|
2022-10-06 04:15:56 +00:00
|
|
|
return s == "y"
|
|
|
|
}
|
2022-10-06 22:03:44 +00:00
|
|
|
|
|
|
|
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"`
|
2022-10-07 04:44:11 +00:00
|
|
|
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
|
2022-10-06 22:03:44 +00:00
|
|
|
}
|