Skip to content

Commit

Permalink
ran make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
teodoradriann committed Dec 14, 2024
1 parent 1170fe1 commit ca654f0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tools/gendocs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -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() }
func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() }

0 comments on commit ca654f0

Please sign in to comment.