fix: remote enabled as default

This commit is contained in:
Markus Pesch 2018-11-28 12:41:50 +01:00
parent 42aa07802a
commit ad171c5d2a
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -8,6 +8,8 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
var enabled bool
var addRemoteCmd = &cobra.Command{ var addRemoteCmd = &cobra.Command{
Use: "add", Use: "add",
Short: "Add Remove Server", Short: "Add Remove Server",
@ -17,6 +19,7 @@ var addRemoteCmd = &cobra.Command{
remoteObject := types.Remote{ remoteObject := types.Remote{
Name: args[0], Name: args[0],
Address: args[1], Address: args[1],
Enabled: enabled,
} }
if err := remote.Add(&remoteObject, configDir); err != nil { if err := remote.Add(&remoteObject, configDir); err != nil {
@ -27,4 +30,5 @@ var addRemoteCmd = &cobra.Command{
func init() { func init() {
remoteCmd.AddCommand(addRemoteCmd) remoteCmd.AddCommand(addRemoteCmd)
addRemoteCmd.Flags().BoolVarP(&enabled, "enabled", "e", true, "Enable Remote Link")
} }