summaryrefslogtreecommitdiff
path: root/docs/varlink/apidoc.go
diff options
context:
space:
mode:
Diffstat (limited to 'docs/varlink/apidoc.go')
-rw-r--r--docs/varlink/apidoc.go7
1 files changed, 5 insertions, 2 deletions
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)
+ }
}