Skip to content

Commit 6df550d

Browse files
updated doc generator
1 parent f1a98cb commit 6df550d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

docs/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ func CliDocs() {
9191
CmdGroups = append(CmdGroups, thisCmdGroup)
9292
}
9393
jOut, err := json.MarshalIndent(CmdGroups, "", " ")
94-
os.WriteFile("sl.json", jOut, 0755)
9594
checkError(err)
95+
err = os.WriteFile("sl.json", jOut, 0755) //#nosec G306 -- This is a false positive
96+
checkError(err)
9697
// fmt.Println(string(jOut))
9798
}
9899

@@ -124,7 +125,7 @@ ibmcloud {{.Use}}
124125
mdTemplate, err := template.New("cmd template").Parse(cmdTemplate)
125126
checkError(err)
126127
filename := fmt.Sprintf("%v.md", cmd.CommandShortLink)
127-
outfile, err := os.Create(filename)
128+
outfile, err := os.Create(filename) //#nosec G304 -- This is a false positive
128129
defer outfile.Close()
129130
err = mdTemplate.Execute(outfile, cmd)
130131
checkError(err)

0 commit comments

Comments
 (0)