You've already forked speedtest-go
@ -8,11 +8,12 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
BindAddress string `mapstructure:"bind_address"`
|
||||
Port string `mapstructure:"listen_port"`
|
||||
ServerLat float64 `mapstructure:"server_lat"`
|
||||
ServerLng float64 `mapstructure:"server_lng"`
|
||||
IPInfoAPIKey string `mapstructure:"ipinfo_api_key"`
|
||||
BindAddress string `mapstructure:"bind_address"`
|
||||
Port string `mapstructure:"listen_port"`
|
||||
ProxyProtocolPort string `mapstructure:"proxyprotocol_port"`
|
||||
ServerLat float64 `mapstructure:"server_lat"`
|
||||
ServerLng float64 `mapstructure:"server_lng"`
|
||||
IPInfoAPIKey string `mapstructure:"ipinfo_api_key"`
|
||||
|
||||
StatsPassword string `mapstructure:"statistics_password"`
|
||||
RedactIP bool `mapstructure:"redact_ip_addresses"`
|
||||
@ -34,6 +35,7 @@ var (
|
||||
|
||||
func init() {
|
||||
viper.SetDefault("listen_port", "8989")
|
||||
viper.SetDefault("proxyprotocol_port", "0")
|
||||
viper.SetDefault("download_chunks", 4)
|
||||
viper.SetDefault("distance_unit", "K")
|
||||
viper.SetDefault("enable_cors", false)
|
||||
|
Reference in New Issue
Block a user