Skip to content

Commit

Permalink
Merge pull request #7 from ADorigi/fix/update-name-checkctl
Browse files Browse the repository at this point in the history
fix: updated project name
  • Loading branch information
ADorigi authored Sep 16, 2024
2 parents bfb37d7 + 4154c07 commit 8b08bb5
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# opengovernance
# checkctl
4 changes: 2 additions & 2 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions cmd/get/benchmarks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/get/controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
},
}

Expand Down
9 changes: 5 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ Copyright © 2024 NAME HERE <EMAIL ADDRESS>
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:
Expand Down Expand Up @@ -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.
Expand Down
11 changes: 6 additions & 5 deletions cmd/run/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
11 changes: 6 additions & 5 deletions cmd/run/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
},
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/adorigi/opengovernance
module github.com/adorigi/checkctl

go 1.22.5

Expand Down
8 changes: 4 additions & 4 deletions goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
project_name: opengovernance
project_name: checkctl

release:
github:
Expand All @@ -10,7 +10,7 @@ checksum: {}

builds:
- id: linux
binary: opengovernance
binary: checkctl
goos:
- linux
goarch:
Expand All @@ -20,7 +20,7 @@ builds:
- CGO_ENABLED=0
main: ./main.go
- id: darwin
binary: opengovernance
binary: checkctl
goos:
- darwin
goarch:
Expand All @@ -30,7 +30,7 @@ builds:
- CGO_ENABLED=0
main: ./main.go
- id: windows
binary: opengovernance
binary: checkctl
goos:
- windows
goarch:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright © 2024 NAME HERE <EMAIL ADDRESS>
*/
package main

import "github.com/adorigi/opengovernance/cmd"
import "github.com/adorigi/checkctl/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions pkg/config/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/table_rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8b08bb5

Please sign in to comment.