mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 23:34:02 +03:00
Remove integration with gotd
This commit is contained in:
@@ -68,7 +68,6 @@ type Config struct {
|
||||
DC TypeDC `json:"dc"`
|
||||
IPs []TypeHostPort `json:"ips"`
|
||||
} `json:"dcOverrides"`
|
||||
DCUpdateEach TypeDuration `json:"dcUpdateEach"`
|
||||
}
|
||||
|
||||
func (c *Config) Validate() error {
|
||||
|
||||
@@ -60,10 +60,9 @@ type tomlConfig struct {
|
||||
} `toml:"prometheus" json:"prometheus,omitempty"`
|
||||
} `toml:"stats" json:"stats,omitempty"`
|
||||
DCOverrides []struct {
|
||||
DC int `toml:"dc" json:"dc"`
|
||||
DC uint `toml:"dc" json:"dc"`
|
||||
IPs []string `toml:"ips" json:"ips"`
|
||||
} `toml:"dc-overrides" json:"dcOverrides,omitempty"`
|
||||
DCUpdateEach string `toml:"dc-update-each" json:"dcUpdateEach,omitempty"`
|
||||
}
|
||||
|
||||
func Parse(rawData []byte) (*Config, error) {
|
||||
|
||||
@@ -24,11 +24,11 @@ func (t *TypeDC) Set(value string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *TypeDC) UnmarshalText(data []byte) error {
|
||||
func (t *TypeDC) UnmarshalJSON(data []byte) error {
|
||||
return t.Set(string(data))
|
||||
}
|
||||
|
||||
func (t TypeDC) MarshalText() ([]byte, error) {
|
||||
func (t TypeDC) MarshalJSON() ([]byte, error) {
|
||||
return []byte(t.String()), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user