From 4154c07c92664d1bb51b917c9f5afc6785ae9eb6 Mon Sep 17 00:00:00 2001 From: Adnan Gulegulzar Date: Sun, 15 Sep 2024 22:18:22 -0400 Subject: [PATCH] fix: updated project name --- Dockerfile | 2 +- README.md | 2 +- cmd/configure.go | 4 ++-- cmd/get/benchmarks.go | 10 +++++----- cmd/get/controls.go | 10 +++++----- cmd/get/get.go | 2 +- cmd/root.go | 9 +++++---- cmd/run/benchmark.go | 11 ++++++----- cmd/run/discovery.go | 11 ++++++----- cmd/run/run.go | 2 +- go.mod | 2 +- goreleaser.yaml | 8 ++++---- main.go | 2 +- makefile | 2 +- pkg/config/configfile.go | 4 ++-- pkg/utils/table_rows.go | 2 +- 16 files changed, 43 insertions(+), 40 deletions(-) diff --git a/Dockerfile b/Dockerfile index b9a7336..17c77ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,5 @@ RUN mkdir app RUN apt-get update && apt-get install -y ca-certificates -COPY ./bin/opengovernance-linux app/ +COPY ./bin/checkctl-linux app/ diff --git a/README.md b/README.md index b5f2bcf..54828f5 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# opengovernance \ No newline at end of file +# checkctl \ No newline at end of file diff --git a/cmd/configure.go b/cmd/configure.go index 676a185..c1f1dde 100644 --- a/cmd/configure.go +++ b/cmd/configure.go @@ -6,8 +6,8 @@ package cmd import ( "github.com/spf13/cobra" - "github.com/adorigi/opengovernance/pkg/config" - "github.com/adorigi/opengovernance/pkg/utils" + "github.com/adorigi/checkctl/pkg/config" + "github.com/adorigi/checkctl/pkg/utils" ) // configureCmd represents the configure command diff --git a/cmd/get/benchmarks.go b/cmd/get/benchmarks.go index 3bfd3f3..02b3110 100644 --- a/cmd/get/benchmarks.go +++ b/cmd/get/benchmarks.go @@ -9,12 +9,12 @@ import ( "io" "net/http" - "github.com/adorigi/opengovernance/pkg/output/tables" + "github.com/adorigi/checkctl/pkg/output/tables" - "github.com/adorigi/opengovernance/pkg/config" - "github.com/adorigi/opengovernance/pkg/request" - "github.com/adorigi/opengovernance/pkg/types" - "github.com/adorigi/opengovernance/pkg/utils" + "github.com/adorigi/checkctl/pkg/config" + "github.com/adorigi/checkctl/pkg/request" + "github.com/adorigi/checkctl/pkg/types" + "github.com/adorigi/checkctl/pkg/utils" "github.com/spf13/cobra" ) diff --git a/cmd/get/controls.go b/cmd/get/controls.go index 2e7392e..e5bfe39 100644 --- a/cmd/get/controls.go +++ b/cmd/get/controls.go @@ -9,12 +9,12 @@ import ( "io" "net/http" - "github.com/adorigi/opengovernance/pkg/output/tables" + "github.com/adorigi/checkctl/pkg/output/tables" - "github.com/adorigi/opengovernance/pkg/config" - "github.com/adorigi/opengovernance/pkg/request" - "github.com/adorigi/opengovernance/pkg/types" - "github.com/adorigi/opengovernance/pkg/utils" + "github.com/adorigi/checkctl/pkg/config" + "github.com/adorigi/checkctl/pkg/request" + "github.com/adorigi/checkctl/pkg/types" + "github.com/adorigi/checkctl/pkg/utils" "github.com/spf13/cobra" ) diff --git a/cmd/get/get.go b/cmd/get/get.go index e54d27a..0201f1e 100644 --- a/cmd/get/get.go +++ b/cmd/get/get.go @@ -20,7 +20,7 @@ Cobra is a CLI library for Go that empowers applications. This application is a tool to generate the needed files to quickly create a Cobra application.`, Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Usage: opengovernance get controls|benchmarks --page_size") + fmt.Println("Usage: checkctl get controls|benchmarks --page_size") }, } diff --git a/cmd/root.go b/cmd/root.go index 3906088..127120c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,16 +4,17 @@ Copyright © 2024 NAME HERE package cmd import ( - "github.com/adorigi/opengovernance/cmd/run" "os" - "github.com/adorigi/opengovernance/cmd/get" + "github.com/adorigi/checkctl/cmd/run" + + "github.com/adorigi/checkctl/cmd/get" "github.com/spf13/cobra" ) // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "opengovernance", + Use: "checkctl", Short: "A brief description of your application", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your application. For example: @@ -46,7 +47,7 @@ func init() { // Cobra supports persistent flags, which, if defined here, // will be global for your application. - // rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.opengovernance.yaml)") + // rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.checkctl.yaml)") // Cobra also supports local flags, which will only run // when this action is called directly. diff --git a/cmd/run/benchmark.go b/cmd/run/benchmark.go index 042a5a9..bbb9795 100644 --- a/cmd/run/benchmark.go +++ b/cmd/run/benchmark.go @@ -3,14 +3,15 @@ package run import ( "encoding/json" "fmt" - "github.com/adorigi/opengovernance/pkg/output/tables" - "github.com/adorigi/opengovernance/pkg/request" "io" "net/http" - "github.com/adorigi/opengovernance/pkg/config" - "github.com/adorigi/opengovernance/pkg/types" - "github.com/adorigi/opengovernance/pkg/utils" + "github.com/adorigi/checkctl/pkg/output/tables" + "github.com/adorigi/checkctl/pkg/request" + + "github.com/adorigi/checkctl/pkg/config" + "github.com/adorigi/checkctl/pkg/types" + "github.com/adorigi/checkctl/pkg/utils" "github.com/spf13/cobra" ) diff --git a/cmd/run/discovery.go b/cmd/run/discovery.go index 16e74b7..3383803 100644 --- a/cmd/run/discovery.go +++ b/cmd/run/discovery.go @@ -3,14 +3,15 @@ package run import ( "encoding/json" "fmt" - "github.com/adorigi/opengovernance/pkg/output/tables" - "github.com/adorigi/opengovernance/pkg/request" "io" "net/http" - "github.com/adorigi/opengovernance/pkg/config" - "github.com/adorigi/opengovernance/pkg/types" - "github.com/adorigi/opengovernance/pkg/utils" + "github.com/adorigi/checkctl/pkg/output/tables" + "github.com/adorigi/checkctl/pkg/request" + + "github.com/adorigi/checkctl/pkg/config" + "github.com/adorigi/checkctl/pkg/types" + "github.com/adorigi/checkctl/pkg/utils" "github.com/spf13/cobra" ) diff --git a/cmd/run/run.go b/cmd/run/run.go index 5937df1..88effd1 100644 --- a/cmd/run/run.go +++ b/cmd/run/run.go @@ -12,7 +12,7 @@ var RunCmd = &cobra.Command{ Short: "Run discovery or benchmark jobs", Long: `Run discovery or benchmark jobs`, Run: func(cmd *cobra.Command, args []string) { - fmt.Println("Usage: opengovernance run discovery|benchmark") + fmt.Println("Usage: checkctl run discovery|benchmark") }, } diff --git a/go.mod b/go.mod index 2501790..c9c4a3e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/adorigi/opengovernance +module github.com/adorigi/checkctl go 1.22.5 diff --git a/goreleaser.yaml b/goreleaser.yaml index 40e8cc5..a352853 100644 --- a/goreleaser.yaml +++ b/goreleaser.yaml @@ -1,5 +1,5 @@ --- -project_name: opengovernance +project_name: checkctl release: github: @@ -10,7 +10,7 @@ checksum: {} builds: - id: linux - binary: opengovernance + binary: checkctl goos: - linux goarch: @@ -20,7 +20,7 @@ builds: - CGO_ENABLED=0 main: ./main.go - id: darwin - binary: opengovernance + binary: checkctl goos: - darwin goarch: @@ -30,7 +30,7 @@ builds: - CGO_ENABLED=0 main: ./main.go - id: windows - binary: opengovernance + binary: checkctl goos: - windows goarch: diff --git a/main.go b/main.go index d0e1a6c..b6bcec6 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ Copyright © 2024 NAME HERE */ package main -import "github.com/adorigi/opengovernance/cmd" +import "github.com/adorigi/checkctl/cmd" func main() { cmd.Execute() diff --git a/makefile b/makefile index cc8bc34..3139c18 100644 --- a/makefile +++ b/makefile @@ -3,7 +3,7 @@ clean: build: clean go build -o bin/ - env GOOS=linux GOARCH=arm go build -o bin/opengovernance-linux + env GOOS=linux GOARCH=arm go build -o bin/checkctl-linux goreleaser: REPOSITORY_OWNER=local REPOSITORY_NAME=local goreleaser build --snapshot \ No newline at end of file diff --git a/pkg/config/configfile.go b/pkg/config/configfile.go index 8259b1f..798ecef 100644 --- a/pkg/config/configfile.go +++ b/pkg/config/configfile.go @@ -14,7 +14,7 @@ func CreateConfigFile(config *Configuration) error { return err } - configFileFolder := path.Join(homeDir, ".opengovernance") + configFileFolder := path.Join(homeDir, ".checkctl") err = os.Mkdir(configFileFolder, os.ModePerm) if err != nil { @@ -45,7 +45,7 @@ func ReadConfigFile() (*Configuration, error) { return nil, err } - configFilePath := path.Join(homeDir, ".opengovernance", "config.json") + configFilePath := path.Join(homeDir, ".checkctl", "config.json") configFile, err := os.Open(configFilePath) if err != nil { diff --git a/pkg/utils/table_rows.go b/pkg/utils/table_rows.go index 4370879..422e0ea 100644 --- a/pkg/utils/table_rows.go +++ b/pkg/utils/table_rows.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/adorigi/opengovernance/pkg/types" + "github.com/adorigi/checkctl/pkg/types" ) func GenerateControlRows(controls []types.Control) [][]string {