chore(lint): add musttag linter and fix lint errors

Breaking change: JSON fields changed in the server API
This commit is contained in:
Quentin McGaw
2023-06-08 07:26:29 +00:00
parent 37f0e5c73b
commit 0da2b6ad0b
13 changed files with 77 additions and 76 deletions

View File

@@ -14,22 +14,22 @@ var (
)
type apiData struct {
LogicalServers []logicalServer
LogicalServers []logicalServer `json:"LogicalServers"`
}
type logicalServer struct {
Name string
ExitCountry string
Region *string
City *string
Servers []physicalServer
Name string `json:"Name"`
ExitCountry string `json:"ExitCountry"`
Region *string `json:"Region"`
City *string `json:"City"`
Servers []physicalServer `json:"Servers"`
}
type physicalServer struct {
EntryIP netip.Addr
ExitIP netip.Addr
Domain string
Status uint8
EntryIP netip.Addr `json:"EntryIP"`
ExitIP netip.Addr `json:"ExitIP"`
Domain string `json:"Domain"`
Status uint8 `json:"Status"`
}
func fetchAPI(ctx context.Context, client *http.Client) (