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
1 changed files with 4 additions and 0 deletions

View File

@ -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")
}