-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): use viper for configuration with default values (#69)
- Loading branch information
Showing
9 changed files
with
136 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package config | ||
|
||
import "path" | ||
|
||
var Defaults = map[string]any{ | ||
"cache.ttl_in_hours": 1, | ||
"cache.path": path.Join(StateDir(), "cache.json"), | ||
|
||
"endpoint.all": true, | ||
"endpoint.max_retry": 10, | ||
"endpoint.max_page": 5, | ||
|
||
"rules": []Rule{}, | ||
|
||
"keymap.normal.cursor up": []string{"up", "k"}, | ||
"keymap.normal.cursor down": []string{"down", "j"}, | ||
"keymap.normal.next page": []string{"right", "l"}, | ||
"keymap.normal.previous page": []string{"left", "h"}, | ||
"keymap.normal.toggle selected": []string{" "}, | ||
"keymap.normal.select all": []string{"a"}, | ||
"keymap.normal.select none": []string{"A"}, | ||
"keymap.normal.open in browser": []string{"o"}, | ||
"keymap.normal.filter mode": []string{"/"}, | ||
"keymap.normal.command mode": []string{":"}, | ||
"keymap.normal.toggle help": []string{"?"}, | ||
"keymap.normal.quit": []string{"q", "esc", "ctrl+c"}, | ||
|
||
"keymap.filter.confirm": []string{"enter"}, | ||
"keymap.filter.cancel": []string{"esc", "ctrl+c"}, | ||
|
||
"keymap.command.confirm": []string{"enter"}, | ||
"keymap.command.cancel": []string{"esc", "ctrl+c"}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.