Skip to content

Commit

Permalink
Merge pull request #64 from jzelinskie/cobra-bump
Browse files Browse the repository at this point in the history
gomod: bump cobrautil to v0.0.7
  • Loading branch information
jzelinskie authored Nov 10, 2021
2 parents c019e0f + 6c1cc9c commit 43c69e4
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
config-file: ".yamllint"
- name: "go fmt/imports"
run: |
go install mvdan.cc/gofumpt/gofumports@latest
go install mvdan.cc/gofumpt/gofumports@v0.1.1
GOFUMPT_OUTPUT="$(gofumports -d .)"
if [ -n "$GOFUMPT_OUTPUT" ]; then
echo "All the following files are not correctly formatted"
Expand Down
10 changes: 5 additions & 5 deletions cmd/zed/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/authzed/grpcutil"
"github.com/jzelinskie/cobrautil"
"github.com/mitchellh/go-homedir"
"github.com/rs/zerolog"
"github.com/spf13/cobra"
"google.golang.org/grpc"

Expand Down Expand Up @@ -43,7 +44,7 @@ func dialOptsFromFlags(cmd *cobra.Command, token string) []grpc.DialOption {

var persistentPreRunE = cobrautil.CommandStack(
cobrautil.SyncViperPreRunE("ZED"),
cobrautil.ZeroLogPreRunE,
cobrautil.ZeroLogPreRunE("log", zerolog.DebugLevel),
)

func main() {
Expand All @@ -54,7 +55,7 @@ func main() {
PersistentPreRunE: persistentPreRunE,
}

cobrautil.RegisterZeroLogFlags(rootCmd.PersistentFlags())
cobrautil.RegisterZeroLogFlags(rootCmd.PersistentFlags(), "log")

rootCmd.PersistentFlags().String("endpoint", "", "authzed gRPC API endpoint")
rootCmd.PersistentFlags().String("permissions-system", "", "permissions system to query")
Expand All @@ -65,9 +66,8 @@ func main() {
_ = rootCmd.PersistentFlags().MarkHidden("debug") // This cannot return its error.

versionCmd := &cobra.Command{
Use: "version",
Short: "display zed version information",
PersistentPreRunE: persistentPreRunE,
Use: "version",
Short: "display zed version information",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version.UsageVersion(cobrautil.MustGetBool(cmd, "include-deps")))
},
Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@ require (
github.com/AlecAivazis/survey/v2 v2.3.2
github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2
github.com/authzed/authzed-go v0.3.0
github.com/authzed/connector-postgresql v0.2.0
github.com/authzed/connector-postgresql v0.2.1-0.20211110161636-5a22597732ae
github.com/authzed/grpcutil v0.0.0-20211020204402-aba1876830e6
github.com/authzed/spicedb v1.1.0
github.com/cockroachdb/cockroach v20.1.13+incompatible
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/hokaccha/go-prettyjson v0.0.0-20210113012101-fb4e108d2519 // indirect
github.com/jzelinskie/cobrautil v0.0.5
github.com/jzelinskie/cobrautil v0.0.7
github.com/jzelinskie/stringz v0.0.1
github.com/mitchellh/go-homedir v1.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/open-policy-agent/opa v0.29.4
github.com/rs/zerolog v1.25.0
github.com/rs/zerolog v1.26.0
github.com/spf13/cobra v1.2.1
github.com/stretchr/testify v1.7.0
golang.org/x/term v0.0.0-20210503060354-a79de5458b56
google.golang.org/grpc v1.41.0
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
tailscale.com v1.6.0
Expand Down
Loading

0 comments on commit 43c69e4

Please sign in to comment.