Merge pull request #978 from cli/fix-linter

Fix lint errors
This commit is contained in:
Nate Smith 2020-05-20 13:59:07 -05:00 committed by GitHub
commit 4e73c83fd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,11 +31,10 @@ func main() {
os.Exit(1)
}
if(*dir == "") {
if *dir == "" {
fatal("no dir set")
}
err := os.MkdirAll(*dir, 0755)
if err != nil {
fatal(err)
@ -48,13 +47,12 @@ func main() {
}
}
if *manPage {
header := &doc.GenManHeader{
Title: "gh",
Section: "1",
Source: "", //source and manual are just put at the top of the manpage, before name
Manual: "", //if source is an empty string, it's set to "Auto generated by spf13/cobra"
Source: "", //source and manual are just put at the top of the manpage, before name
Manual: "", //if source is an empty string, it's set to "Auto generated by spf13/cobra"
}
err = doc.GenManTree(command.RootCmd, header, *dir)
if err != nil {