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