Skip to content

Commit

Permalink
fix: Corrects invalid gosec lint error (#151)
Browse files Browse the repository at this point in the history
Adds a few nice to have just commands

Signed-off-by: John McBride <[email protected]>
  • Loading branch information
jpmcb authored Sep 6, 2024
1 parent 2961c89 commit f76527f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,19 @@ lint:
format:
find . -type f -name "*.go" -exec goimports -local github.com/open-sauced/pizza-cli -w {} \;

# Installs the dev tools for working with this project. Requires "go", "just", and "docker"
install-dev-tools:
#!/usr/bin/env sh
go install golang.org/x/tools/cmd/goimports@latest

# Runs Go code manually through the main.go
run:
go run main.go

# Re-generates the docs from the cobra command tree
gen-docs:
go run main.go docs ./docs/

# Runs all the dev tasks (like formatting, linting, building, etc.)
dev: format lint test build-all
2 changes: 2 additions & 0 deletions pkg/utils/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func SetupRootCommand(rootCmd *cobra.Command) {

// Uses the users terminal size or width of 80 if cannot determine users width
func wrappedFlagUsages(cmd *pflag.FlagSet) string {
// converts the uintptr to the system file descriptor integer
//nolint:gosec
fd := int(os.Stdout.Fd())
width := 80

Expand Down

0 comments on commit f76527f

Please sign in to comment.