diff options
author | Julien Dessaux | 2021-09-11 12:27:59 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-09-11 12:27:59 +0200 |
commit | aff4790d22728d89e7e2dac8af262c92087b5b39 (patch) | |
tree | a9e4ccae95529835abb0b18e856f3f40b98c0f8e /pkg/config/config.go | |
parent | Changed the way html pages title is set (diff) | |
download | trains-aff4790d22728d89e7e2dac8af262c92087b5b39.tar.gz trains-aff4790d22728d89e7e2dac8af262c92087b5b39.tar.bz2 trains-aff4790d22728d89e7e2dac8af262c92087b5b39.zip |
Piece evry last week changes together in a big rewrite of the webui
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 } |