summaryrefslogtreecommitdiffstats
path: root/pkg/cheatsheet
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/cheatsheet')
-rw-r--r--pkg/cheatsheet/check.go3
-rw-r--r--pkg/cheatsheet/generate.go2
2 files changed, 2 insertions, 3 deletions
diff --git a/pkg/cheatsheet/check.go b/pkg/cheatsheet/check.go
index 03f65d910..ebcd0629f 100644
--- a/pkg/cheatsheet/check.go
+++ b/pkg/cheatsheet/check.go
@@ -19,7 +19,7 @@ func Check() {
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
}
- err = os.Mkdir(tmpDir, 0700)
+ err = os.Mkdir(tmpDir, 0o700)
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
}
@@ -70,7 +70,6 @@ func obtainContent(dir string) string {
return nil
})
-
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
}
diff --git a/pkg/cheatsheet/generate.go b/pkg/cheatsheet/generate.go
index 804cb6b45..c7c2b0d37 100644
--- a/pkg/cheatsheet/generate.go
+++ b/pkg/cheatsheet/generate.go
@@ -174,7 +174,7 @@ outer:
bindings []*types.Binding
}
- groupedBindings := make([]groupedBindingsType, len(contextAndViewBindingMap))
+ groupedBindings := make([]groupedBindingsType, 0, len(contextAndViewBindingMap))
for contextAndView, contextBindings := range contextAndViewBindingMap {
groupedBindings = append(groupedBindings, groupedBindingsType{contextAndView: contextAndView, bindings: contextBindings})