From 34a6351379da5f0b2b7d9dbe4d24ba277b9e4368 Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 23 Feb 2020 16:37:22 +0100 Subject: define the bots --- src/config.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 +} -- cgit 1.4.1