fix: remote enabled as default
This commit is contained in:
parent
42aa07802a
commit
ad171c5d2a
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user