From aff4790d22728d89e7e2dac8af262c92087b5b39 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 11 Sep 2021 12:27:59 +0200 Subject: Piece evry last week changes together in a big rewrite of the webui --- pkg/config/config.go | 7 ------- 1 file changed, 7 deletions(-) (limited to 'pkg/config/config.go') 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 } -- cgit v1.2.3