mirror of
https://github.com/openziti/zrok.git
synced 2025-03-03 09:31:26 +01:00
'zrok agent' -> 'zrok agent start' (#463)
This commit is contained in:
parent
95098e6357
commit
3c310c27db
@ -8,25 +8,25 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(newAgentCommand().cmd)
|
||||
agentCmd.AddCommand(newAgentStartCommand().cmd)
|
||||
}
|
||||
|
||||
type agentCommand struct {
|
||||
type agentStartCommand struct {
|
||||
cmd *cobra.Command
|
||||
}
|
||||
|
||||
func newAgentCommand() *agentCommand {
|
||||
func newAgentStartCommand() *agentStartCommand {
|
||||
cmd := &cobra.Command{
|
||||
Use: "agent",
|
||||
Use: "start",
|
||||
Short: "Launch a zrok agent",
|
||||
Args: cobra.NoArgs,
|
||||
}
|
||||
command := &agentCommand{cmd: cmd}
|
||||
command := &agentStartCommand{cmd: cmd}
|
||||
cmd.Run = command.run
|
||||
return command
|
||||
}
|
||||
|
||||
func (cmd *agentCommand) run(_ *cobra.Command, _ []string) {
|
||||
func (cmd *agentStartCommand) run(_ *cobra.Command, _ []string) {
|
||||
root, err := environment.LoadRoot()
|
||||
if err != nil {
|
||||
tui.Error("error loading zrokdir", err)
|
||||
|
@ -23,6 +23,7 @@ func init() {
|
||||
adminCmd.AddCommand(adminDeleteCmd)
|
||||
adminCmd.AddCommand(adminListCmd)
|
||||
adminCmd.AddCommand(adminUpdateCmd)
|
||||
rootCmd.AddCommand(agentCmd)
|
||||
testCmd.AddCommand(loopCmd)
|
||||
rootCmd.AddCommand(adminCmd)
|
||||
rootCmd.AddCommand(configCmd)
|
||||
@ -75,6 +76,12 @@ var adminUpdateCmd = &cobra.Command{
|
||||
Short: "Update global resources",
|
||||
}
|
||||
|
||||
var agentCmd = &cobra.Command{
|
||||
Use: "agent",
|
||||
Short: "zrok Agent commands",
|
||||
Aliases: []string{"daemon"},
|
||||
}
|
||||
|
||||
var configCmd = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "Configure your zrok environment",
|
||||
|
Loading…
Reference in New Issue
Block a user