Skip to content

Commit

Permalink
rename from pkg to cmd in line with new golang conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
taigrr committed Sep 23, 2023
1 parent 7b8383b commit 9f9a0da
Show file tree
Hide file tree
Showing 20 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif

all: sprout grlx farmer

sprout: pkg/sprout/*.go
sprout: cmd/sprout/*.go
ifeq ($(GOOS),)
@printf "OS not specified, defaulting to: \e[33m$(UNAME)\e[39m\n"
else
Expand All @@ -23,11 +23,11 @@ endif
export CGO_ENABLED=0;\
export GitCommit=`git rev-parse HEAD | cut -c -7`;\
export GitTag=$$(TAG=`git tag --contains $$(git rev-parse HEAD) | sort -R | tr '\n' ' '`; if [ "$$(printf "$$TAG")" ]; then printf "$$TAG"; else printf "undefined"; fi);\
go build -ldflags "-X main.GitCommit=$$GitCommit -X main.Tag=$$GitTag" -o "bin/sprout" ./pkg/sprout/*.go
go build -ldflags "-X main.GitCommit=$$GitCommit -X main.Tag=$$GitTag" -o "bin/sprout" ./cmd/sprout/*.go
@printf "\e[32mSuccess!\e[39m\n"


grlx: pkg/grlx/*.go
grlx: cmd/grlx/*.go
ifeq ($(GOOS),)
@printf "OS not specified, defaulting to: \e[33m$(UNAME)\e[39m\n"
else
Expand All @@ -40,11 +40,11 @@ endif
export GitCommit=`git rev-parse HEAD | cut -c -7`;\
export BuildTime=`date -u +%Y%m%d.%H%M%S`;\
export GitTag=$$(TAG=`git tag --contains $$(git rev-parse HEAD) | sort -R | tr '\n' ' '`; if [ "$$(printf "$$TAG")" ]; then printf "$$TAG"; else printf "undefined"; fi);\
go build -ldflags "-X main.GitCommit=$$GitCommit -X main.Tag=$$GitTag" -o "bin/grlx" ./pkg/grlx/main.go
go build -ldflags "-X main.GitCommit=$$GitCommit -X main.Tag=$$GitTag" -o "bin/grlx" ./cmd/grlx/main.go
@printf "\e[32mSuccess!\e[39m\n"


farmer: pkg/farmer/*.go
farmer: cmd/farmer/*.go
ifeq ($(GOOS),)
@printf "OS not specified, defaulting to: \e[33m$(UNAME)\e[39m\n"
else
Expand All @@ -57,7 +57,7 @@ endif
export GitCommit=`git rev-parse HEAD | cut -c -7`;\
export BuildTime=`date -u +%Y%m%d.%H%M%S`;\
export GitTag=$$(TAG=`git tag --contains $$(git rev-parse HEAD) | sort -R | tr '\n' ' '`; if [ "$$(printf "$$TAG")" ]; then printf "$$TAG"; else printf "undefined"; fi);\
go build -ldflags "-X main.GitCommit=$$GitCommit -X main.Tag=$$GitTag" -o "bin/farmer" ./pkg/farmer/main.go
go build -ldflags "-X main.GitCommit=$$GitCommit -X main.Tag=$$GitTag" -o "bin/farmer" ./cmd/farmer/main.go
@printf "\e[32mSuccess!\e[39m\n"


Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/grlx/cmd/cmd.go → cmd/grlx/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/fatih/color"
gcmd "github.com/gogrlx/grlx/pkg/grlx/ingredients/cmd"
gcmd "github.com/gogrlx/grlx/cmd/grlx/ingredients/cmd"
"github.com/gogrlx/grlx/types"
"github.com/spf13/cobra"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/grlx/cmd/keys.go → cmd/grlx/cmd/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"

gpki "github.com/gogrlx/grlx/api/client"
"github.com/gogrlx/grlx/pkg/grlx/util"
"github.com/gogrlx/grlx/cmd/grlx/util"
"github.com/gogrlx/grlx/types"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/grlx/cmd/root.go → cmd/grlx/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/gogrlx/grlx/cmd/grlx/util"
"github.com/gogrlx/grlx/config"
"github.com/gogrlx/grlx/pkg/grlx/util"
"github.com/gogrlx/grlx/pki"
"github.com/gogrlx/grlx/types"
)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/grlx/cmd/test.go → cmd/grlx/cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"

"github.com/fatih/color"
test "github.com/gogrlx/grlx/pkg/grlx/ingredients/test"
test "github.com/gogrlx/grlx/cmd/grlx/ingredients/test"
"github.com/gogrlx/grlx/types"
"github.com/spf13/cobra"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/grlx/main.go → cmd/grlx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

log "github.com/taigrr/log-socket/log"

"github.com/gogrlx/grlx/pkg/grlx/cmd"
"github.com/gogrlx/grlx/cmd/grlx/cmd"
"github.com/gogrlx/grlx/types"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9f9a0da

Please sign in to comment.