From ca654f09f231cac69d7acf11935a618e0f8a5e43 Mon Sep 17 00:00:00 2001 From: Teodor Adrian Miron Date: Sat, 14 Dec 2024 16:30:11 +0200 Subject: [PATCH] ran make fmt --- tools/gendocs/main.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/gendocs/main.go b/tools/gendocs/main.go index c77ce4bcb..e96188ae8 100644 --- a/tools/gendocs/main.go +++ b/tools/gendocs/main.go @@ -25,8 +25,10 @@ import ( "github.com/spf13/pflag" ) -const MAN_DIR = "../../docs/man" -const MAN_INSTALL_DIR = "/usr/local/share/man/man1" +const ( + MAN_DIR = "../../docs/man" + MAN_INSTALL_DIR = "/usr/local/share/man/man1" +) func main() { if len(os.Args[1:]) == 0 { @@ -57,7 +59,7 @@ func main() { } fmt.Println("Man pages generated successfully in kraftkit/docs/man") - + case "--install", "-i": srcDir := MAN_DIR destDir := MAN_INSTALL_DIR @@ -66,7 +68,7 @@ func main() { os.Exit(1) } fmt.Println("Man pages installed successfully!") - + default: outdir := arg if err := os.MkdirAll(outdir, 0o775); err != nil { @@ -455,4 +457,4 @@ type byName []*cobra.Command func (s byName) Len() int { return len(s) } func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() } \ No newline at end of file +func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() }