-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
72 additions
and
46 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
version: 1 | ||
|
||
project_name: replace_me | ||
project_name: cs-policy | ||
|
||
release: | ||
prerelease: auto | ||
|
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
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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
/* | ||
Copyright © 2024 NAME HERE <EMAIL ADDRESS> | ||
*/ | ||
package main | ||
|
||
import "github.com/crowdstrike/gcp-os-policy/cmd" | ||
import "github.com/crowdstrike/gcp-os-policy/pkg/cmd/root" | ||
|
||
func main() { | ||
cmd.Execute() | ||
root.Execute() | ||
} |
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,28 @@ | ||
package root | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/MakeNowJust/heredoc" | ||
"github.com/crowdstrike/gcp-os-policy/pkg/cmd/setup" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// rootCmd represents the base command when called without any subcommands | ||
var rootCmd = &cobra.Command{ | ||
Use: "cs-policy <command> [flags]", | ||
Short: "cs-policy CLI", | ||
Example: heredoc.Doc(` | ||
$ cs-policy setup --help | ||
`), | ||
} | ||
|
||
// Execute adds all child commands to the root cs-policy setup and sets flags appropriately. | ||
func Execute() { | ||
rootCmd.AddCommand(setup.NewSetupCmd()) | ||
|
||
err := rootCmd.Execute() | ||
if err != nil { | ||
os.Exit(1) | ||
} | ||
} |
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