From 167772b87698cce479090dbe5bd3d1cc7c1bc808 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 20 Dec 2025 14:20:42 +0100 Subject: Implement passing user configuration This allows overwriting values of the default configuration with custom ones. --- flags.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 flags.go (limited to 'flags.go') diff --git a/flags.go b/flags.go new file mode 100644 index 0000000..11a79c6 --- /dev/null +++ b/flags.go @@ -0,0 +1,15 @@ +package main + +import ( + "flag" +) + +type Flags struct { + ConfigPath string +} + +func (f *Flags) FromArgs() { + flag.StringVar(&f.ConfigPath, "config", "", "path to configuration file") + + flag.Parse() +} -- cgit v1.2.3-70-g09d2