Skip to content

Commit

Permalink
Use a common "system" flag instead of "system-jobs", "system-containe…
Browse files Browse the repository at this point in the history
…rs" etc.
  • Loading branch information
nvoxland committed May 16, 2020
1 parent ad70c43 commit a469caa
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/system-control/cmd/logs_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var logsContainerCmd = &cobra.Command{
}

func init() {
logsContainerCmd.Flags().BoolVar(&systemService, "system-container", false, "Set this flag if the container is for a system service")
logsContainerCmd.Flags().BoolVar(&systemService, "system", false, "Set this flag if the container is for a system service")
logsContainerCmd.Flags().BoolVar(&previousLogs, "previous", false, "Output logs from the previously ran instance")
logsContainerCmd.Flags().BoolVar(&watchLogs, "watch", false, "Continue to output log messages")
logsContainerCmd.Flags().StringVar(&logsSince, "since", "24h", "Oldest logs to show. Specify as a number and unit, such as 15m or 3h. Defaults to 24h. To list all logs, specify 'all'")
Expand Down
2 changes: 1 addition & 1 deletion cmd/system-control/cmd/logs_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var systemJobs bool

func init() {

logsJobCmd.Flags().BoolVar(&systemJobs, "system-job", false, "Set this flag if the job is a system job")
logsJobCmd.Flags().BoolVar(&systemJobs, "system", false, "Set this flag if the job is a system job")
logsJobCmd.Flags().BoolVar(&watchLogs, "watch", false, "Continue to output log messages")

logsCmd.AddCommand(logsJobCmd)
Expand Down
2 changes: 1 addition & 1 deletion cmd/system-control/cmd/logs_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var logsNode string

func init() {

logsServiceCmd.Flags().BoolVar(&systemService, "system-service", false, "Set this flag if the service is a system service")
logsServiceCmd.Flags().BoolVar(&systemService, "system", false, "Set this flag if the service is a system service")
logsServiceCmd.Flags().BoolVar(&watchLogs, "watch", false, "Continue to output log messages")
logsServiceCmd.Flags().StringVar(&logsSince, "since", "24h", "Oldest logs to show. Specify as a number and unit, such as 15m or 3h. Defaults to 24h. To list all logs, specify 'all'")
logsServiceCmd.Flags().StringVar(&logsNode, "node", "all", "Show only containers on the given node. To list logs across all nodes, specify 'all'")
Expand Down
2 changes: 1 addition & 1 deletion cmd/system-control/cmd/restart_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var restartContainerCmd = &cobra.Command{
}

func init() {
restartContainerCmd.Flags().BoolVar(&systemContainer, "system-container", false, "Set this flag if the container is a system container")
restartContainerCmd.Flags().BoolVar(&systemContainer, "system", false, "Set this flag if the container is a system container")

restartCmd.AddCommand(restartContainerCmd)
}
2 changes: 1 addition & 1 deletion cmd/system-control/cmd/restart_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var restartServiceCmd = &cobra.Command{
}

func init() {
restartServiceCmd.Flags().BoolVar(&systemService, "system-service", false, "Set this flag if the service is a system service")
restartServiceCmd.Flags().BoolVar(&systemService, "system", false, "Set this flag if the service is a system service")

restartCmd.AddCommand(restartServiceCmd)
}
2 changes: 1 addition & 1 deletion cmd/system-control/cmd/status_jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var statusJobsCmd = &cobra.Command{

func init() {

statusJobsCmd.Flags().BoolVar(&includeSystemJobs, "include-system-jobs", false, "Include system-level jobs in output")
statusJobsCmd.Flags().BoolVar(&includeSystemJobs, "include-system", false, "Include system-level jobs in output")
statusJobsCmd.Flags().BoolVar(&watchJobs, "watch", false, "Continue watching for changes to the jobs")

statusCmd.AddCommand(statusJobsCmd)
Expand Down
2 changes: 1 addition & 1 deletion cmd/system-control/cmd/status_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var statusServicesCmd = &cobra.Command{

func init() {

statusServicesCmd.Flags().BoolVar(&includeSystemServices, "include-system-services", false, "Include system-level services in output")
statusServicesCmd.Flags().BoolVar(&includeSystemServices, "include-system", false, "Include system-level services in output")
statusServicesCmd.Flags().BoolVar(&watchServices, "watch", false, "Continue watching for changes to the services")

statusCmd.AddCommand(statusServicesCmd)
Expand Down

0 comments on commit a469caa

Please sign in to comment.