diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/config/config.go | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go index 795ccd0..442695c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -9,7 +9,6 @@ import ( ) var validToken = regexp.MustCompile(`^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`) -var validTrainStop = regexp.MustCompile(`^[a-zA-Z0-9:_]+$`) type Config struct { // Address is the hostname or ip the web server will listen to @@ -18,8 +17,6 @@ type Config struct { Port string `yaml:"port"` // Token is the sncf api token Token string `yaml:"token"` - // TrainStop is the navitia code of the train stop the webapp will monitor - TrainStop string `yaml:"trainStop"` } func (c *Config) validate() error { @@ -43,10 +40,6 @@ func (c *Config) validate() error { if ok := validToken.MatchString(c.Token); !ok { return newInvalidTokenError(c.Token) } - // TrainStop - if ok := validTrainStop.MatchString(c.TrainStop); !ok { - return newInvalidTrainStopError(c.TrainStop) - } return nil } |