Skip to content

Commit

Permalink
Move main package to under cmd/
Browse files Browse the repository at this point in the history
It's a Go convention that main packages (one per each binary produced) are
scoped under `cmd/`.

https://github.com/github/go-lang/blob/master/docs/style-guide.md#directory-structure-and-filenames-layout
  • Loading branch information
mislav committed Jan 23, 2020
1 parent 50a8956 commit 02f5a68
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ before:
- go mod tidy
builds:
- binary: bin/gh
main: ./cmd/gh
ldflags:
- -s -w -X github.com/github/gh-cli/command.Version={{.Version}} -X github.com/github/gh-cli/command.BuildDate={{time "2006-01-02"}}
- -X github.com/github/gh-cli/context.oauthClientID={{.Env.GH_OAUTH_CLIENT_ID}}
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ifdef GH_OAUTH_CLIENT_SECRET
endif

bin/gh: $(BUILD_FILES)
@go build -ldflags "$(LDFLAGS)" -o "$@"
@go build -ldflags "$(LDFLAGS)" -o "$@" ./cmd/gh

test:
go test ./...
Expand Down
File renamed without changes.

0 comments on commit 02f5a68

Please sign in to comment.