From ad171c5d2ab6cdf7df9eced6e422e7d50099dbf6 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Wed, 28 Nov 2018 12:41:50 +0100 Subject: [PATCH] fix: remote enabled as default --- cmd/remote/add.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/remote/add.go b/cmd/remote/add.go index 4dcef33..68403aa 100644 --- a/cmd/remote/add.go +++ b/cmd/remote/add.go @@ -8,6 +8,8 @@ import ( "github.com/spf13/cobra" ) +var enabled bool + var addRemoteCmd = &cobra.Command{ Use: "add", Short: "Add Remove Server", @@ -17,6 +19,7 @@ var addRemoteCmd = &cobra.Command{ remoteObject := types.Remote{ Name: args[0], Address: args[1], + Enabled: enabled, } if err := remote.Add(&remoteObject, configDir); err != nil { @@ -27,4 +30,5 @@ var addRemoteCmd = &cobra.Command{ func init() { remoteCmd.AddCommand(addRemoteCmd) + addRemoteCmd.Flags().BoolVarP(&enabled, "enabled", "e", true, "Enable Remote Link") }