From 4533dea70e1ffbf395d31efcbab4989705fa4d8c Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 13 Jan 2020 20:11:00 +0100 Subject: make lint: include docs/ Signed-off-by: Valentin Rothberg --- docs/varlink/apidoc.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/varlink/apidoc.go b/docs/varlink/apidoc.go index 884ce54fe..87304de15 100644 --- a/docs/varlink/apidoc.go +++ b/docs/varlink/apidoc.go @@ -181,7 +181,7 @@ func generateIndex(methods []funcDescriber, types []typeDescriber, errors []err, } for _, outArg := range method.returnParams { - outArgs = append(outArgs, fmt.Sprintf("%s", outArg.paramKind)) + outArgs = append(outArgs, outArg.paramKind) } b.WriteString(fmt.Sprintf("\n[func %s(%s) %s](#%s)\n", method.Name, strings.Join(inArgs, ", "), strings.Join(outArgs, ", "), method.Name)) @@ -272,5 +272,8 @@ func main() { out = generateTypeDescriptions(types, out) out.WriteString("## Errors\n") out = generateErrorDescriptions(errors, out) - ioutil.WriteFile(mdFile, out.Bytes(), 0755) + if err := ioutil.WriteFile(mdFile, out.Bytes(), 0755); err != nil { + fmt.Fprintf(os.Stderr, "Error writing file: %v\n", err) + os.Exit(1) + } } -- cgit v1.2.3-54-g00ecf