diff options
author | Emile <hanemile@protonmail.com> | 2020-02-23 16:37:22 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2020-02-23 16:37:22 +0100 |
commit | 34a6351379da5f0b2b7d9dbe4d24ba277b9e4368 (patch) | |
tree | d1c7437bff585a955d7dfb3b23db62b64076ac3c /src/config.go | |
parent | 8706b19ea15e99a9de46f8aefb55fbcdcad0f063 (diff) |
define the bots
Diffstat (limited to 'src/config.go')
-rw-r--r-- | src/config.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/config.go b/src/config.go index 44e9f21..577862c 100644 --- a/src/config.go +++ b/src/config.go @@ -56,3 +56,20 @@ func parseConfig() Config { return config } + +// define bots defines the bots given via command line arguments +func defineBots(config *Config) { + + logrus.Info("Defining the bots") + + // define a list of bots by parsing the command line arguments one by one + var bots []Bot + for i := 0; i < config.AmountOfBots; i++ { + bot := Bot{ + Path: flag.Arg(i), + } + bots = append(bots, bot) + } + + config.Bots = bots +} |