From 7fd4cc40980c51221af5ca0c3c3cc6ee301632f7 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 24 Apr 2024 21:13:05 +0200 Subject: Add command line help page This is expected functionality for a command line application. --- flags.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 flags.go (limited to 'flags.go') diff --git a/flags.go b/flags.go new file mode 100644 index 0000000..2696ce4 --- /dev/null +++ b/flags.go @@ -0,0 +1,17 @@ +package main + +import ( + "flag" + "fmt" +) + +const help = `Ceres - A recipe server for your home network +` + +func parseFlags() { + flag.Usage = func() { + fmt.Fprintf(flag.CommandLine.Output(), help) + } + + flag.Parse() +} -- cgit v1.2.3-70-g09d2