aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/del.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2026-07-20 16:14:29 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2026-07-20 16:14:29 +0530
commit7ddcfd4d6421473dca5e19b9f8aa227a52382ee3 (patch)
treee70781dd6344a93e2a5378ed13c00f980f296f1c /cmd/del.go
parent3a089525cbc8a5b0ba86878e3fe5deec663a0f81 (diff)
added 'default guestbook' optionv1.7.0
Diffstat (limited to 'cmd/del.go')
-rw-r--r--cmd/del.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/del.go b/cmd/del.go
index 60dad6c..5764d86 100644
--- a/cmd/del.go
+++ b/cmd/del.go
@@ -87,5 +87,9 @@ var delCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(delCmd)
- delCmd.Flags().StringP("guestbook", "g", "my_guestbook", "Guestbook name (defined in /etc/guestbook.toml)")
+ if viper.IsSet("default_guestbook") {
+ defaultGuestbook = viper.GetString("default_guestbook")
+ }
+
+ delCmd.Flags().StringP("guestbook", "g", defaultGuestbook, "Guestbook name (defined in /etc/guestbook.toml)")
}