Added a flag called 'generate-config' which will generate default config files.

This commit is contained in:
2024-08-12 11:27:07 -05:00
parent 7feac0b5f7
commit 94d1d99af2

View File

@@ -2,6 +2,7 @@ package main
import (
"errors"
"flag"
"fmt"
"os"
"path/filepath"
@@ -59,6 +60,12 @@ func printFile(fileName string) {
}
func main() {
generateConfigFlag := flag.Bool("generate-config", false, "Generate default config files")
flag.Parse()
if *generateConfigFlag {
generateDefaultConfigs()
os.Exit(0)
}
// Check if user has provided a file name
if len(os.Args) != 2 {