This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the base `prm set` command. This command will simply output the help function for `prm set` when invoked.
- Loading branch information
sanfrancrisko
committed
Nov 9, 2021
1 parent
8b7c69f
commit aa2bef2
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package set | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
const ( | ||
PUPPET string = "puppet" | ||
) | ||
|
||
func CreateSetCommand() *cobra.Command { | ||
tmp := &cobra.Command{ | ||
Use: fmt.Sprintf("set %s [args]", PUPPET), | ||
Short: "Sets the specified configuration to the specified value", | ||
Long: "Sets the specified configuration to the specified value", | ||
ValidArgs: []string{PUPPET}, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
cmd.HelpFunc()(cmd, args) | ||
}, | ||
} | ||
return tmp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters