summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-01-13 20:11:00 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-01-14 09:54:48 +0100
commit4533dea70e1ffbf395d31efcbab4989705fa4d8c (patch)
treeb322190f793eda306349085d336a1db5636602c5
parent4fb24ab145ad75051092e4e76f720f533ad7bb71 (diff)
downloadpodman-4533dea70e1ffbf395d31efcbab4989705fa4d8c.tar.gz
podman-4533dea70e1ffbf395d31efcbab4989705fa4d8c.tar.bz2
podman-4533dea70e1ffbf395d31efcbab4989705fa4d8c.zip
make lint: include docs/
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-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)
+ }
}