summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.golangci.yml1
-rw-r--r--docs/varlink/apidoc.go7
2 files changed, 5 insertions, 3 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 948d2f479..4b8850d02 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -11,7 +11,6 @@ run:
- contrib
- dependencies
- test
- - docs
skip-files:
- iopodman.go
linters:
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)
+ }
}