summaryrefslogtreecommitdiffstats
path: root/pkg/cheatsheet
diff options
context:
space:
mode:
authorGustavo Andrioli <gusaandrioli@gmail.com>2022-10-15 13:47:55 -0300
committerGustavo Andrioli <gusaandrioli@gmail.com>2022-10-15 13:55:44 -0300
commit39e84e13f4ed80ff94b2a1fc6e66685c24fa6d1e (patch)
treef640b2a2e78f8485dbc9a6d504c1366e19c67224 /pkg/cheatsheet
parent05089b9a9a26502c2c4b92f20e60979ce02bca67 (diff)
Use lazycore utils: Clamp and GetLazyRootDirectory
Diffstat (limited to 'pkg/cheatsheet')
-rw-r--r--pkg/cheatsheet/check.go2
-rw-r--r--pkg/cheatsheet/generate.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/pkg/cheatsheet/check.go b/pkg/cheatsheet/check.go
index 6123e4aa5..5c4df97ef 100644
--- a/pkg/cheatsheet/check.go
+++ b/pkg/cheatsheet/check.go
@@ -12,7 +12,7 @@ import (
)
func Check() {
- dir := GetDir()
+ dir := GetKeybindingsDir()
tmpDir := filepath.Join(os.TempDir(), "lazygit_cheatsheet")
err := os.RemoveAll(tmpDir)
if err != nil {
diff --git a/pkg/cheatsheet/generate.go b/pkg/cheatsheet/generate.go
index 3b9d9c2d1..437db154d 100644
--- a/pkg/cheatsheet/generate.go
+++ b/pkg/cheatsheet/generate.go
@@ -15,12 +15,12 @@ import (
"github.com/jesseduffield/generics/maps"
"github.com/jesseduffield/generics/slices"
+ "github.com/jesseduffield/lazycore/pkg/utils"
"github.com/jesseduffield/lazygit/pkg/app"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/i18n"
- "github.com/jesseduffield/lazygit/pkg/utils"
"github.com/samber/lo"
)
@@ -44,8 +44,8 @@ func CommandToRun() string {
return "go run scripts/cheatsheet/main.go generate"
}
-func GetDir() string {
- return utils.GetLazygitRootDirectory() + "/docs/keybindings"
+func GetKeybindingsDir() string {
+ return utils.GetLazyRootDirectory() + "/docs/keybindings"
}
func generateAtDir(cheatsheetDir string) {
@@ -75,7 +75,7 @@ func generateAtDir(cheatsheetDir string) {
}
func Generate() {
- generateAtDir(GetDir())
+ generateAtDir(GetKeybindingsDir())
}
func writeString(file *os.File, str string) {