From 77ea50f06203924b3d288fb4aac1445bb650726c Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 18 Oct 2017 20:57:51 -0500 Subject: [PATCH] move main.go to cmd folder. (#292) * move main.go to cmd folder. Signed-off-by: Bo-Yi Wu * move docs. Signed-off-by: Bo-Yi Wu --- Makefile | 10 +++++----- README.md | 2 +- doc.go => cmd/doc.go | 0 main.go => cmd/main.go | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename doc.go => cmd/doc.go (100%) rename main.go => cmd/main.go (100%) diff --git a/Makefile b/Makefile index 5880f13..1f50f63 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ unconvert: # Install from source. install: $(SOURCES) - $(GO) install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' + $(GO) install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' github.com/appleboy/gorush/cmd @echo "==> Installed gorush ${GOPATH}/bin/gorush" .PHONY: install @@ -102,7 +102,7 @@ build: $(EXECUTABLE) .PHONY: build $(EXECUTABLE): $(SOURCES) - $(GO) build -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o bin/$@ + $(GO) build -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o bin/$@ github.com/appleboy/gorush/cmd .PHONY: misspell-check misspell-check: @@ -173,13 +173,13 @@ release-check: cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;) docker_build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE) + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE) github.com/appleboy/gorush/cmd docker_build_arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE)-arm64 + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE)-arm64 github.com/appleboy/gorush/cmd docker_build_arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE)-arm + CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $(GO) build -a -tags '$(TAGS)' -ldflags "$(EXTLDFLAGS)-s -w $(LDFLAGS)" -o bin/$(EXECUTABLE)-arm github.com/appleboy/gorush/cmd docker_image: docker build -t $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE) -f Dockerfile . diff --git a/README.md b/README.md index fa71786..2797eea 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ The pre-compiled binaries can be downloaded from [release page](https://github.c With `Go` installed ``` -$ go get -u -v github.com/appleboy/gorush +$ go get -u -v github.com/appleboy/gorush/cmd ``` On linux diff --git a/doc.go b/cmd/doc.go similarity index 100% rename from doc.go rename to cmd/doc.go diff --git a/main.go b/cmd/main.go similarity index 100% rename from main.go rename to cmd/main.go