From 1e2a3377e43786e25dc03b8612513d47f8dfb3c6 Mon Sep 17 00:00:00 2001
From: xengineering <me@xengineering.eu>
Date: Wed, 1 May 2024 13:58:54 +0200
Subject: Add --config flag

This re-enables config file support.
---
 flags.go | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'flags.go')

diff --git a/flags.go b/flags.go
index 862cffa..708e832 100644
--- a/flags.go
+++ b/flags.go
@@ -7,17 +7,22 @@ import (
 
 const help = `Ceres - Recipe server for local networks
 
-Usage: ceres [-h | --help] [-v | --version]
+Usage: ceres [-h | --help] [-v | --version] [-c | --config]
 
   -h, --help                 show this help page and exit
   -v, --version              print version information
+  -c, --config               file path to configuration file
 `
 
 var printVersion bool
 
 func init() {
 	flag.BoolVar(&printVersion, "version", false, "print version information")
-	flag.BoolVar(&printVersion, "v", false, "print version information")
+	flag.BoolVar(&printVersion, "v",       false, "print version information")
+
+	flag.StringVar(&config.Path, "config", "", "file path to configuration file")
+	flag.StringVar(&config.Path, "c",      "", "file path to configuration file")
+
 	flag.Usage = func() {
 		fmt.Fprintf(flag.CommandLine.Output(), help)
 	}
-- 
cgit v1.2.3-70-g09d2