diff --git a/.copier-answers.yml b/.copier-answers.yml index 381ef3a..70f0bb0 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ --- # Changes here will be overwritten by Copier -_commit: v2.4.0 +_commit: v2.4.4 _src_path: gh:remerge/template is_golang_library: true project_id: go-server diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index f40bd96..a33c82a 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -14,7 +14,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - run: echo "GO_VERSION=$(grep '^go ' < go.mod | awk '{print $2}')" >> "$GITHUB_ENV" + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ${{ env.GO_VERSION }} - uses: webfactory/ssh-agent@v0.6.0 with: ssh-private-key: "${{ secrets.DEPLOY_USER_SSH_KEY }}" diff --git a/README.md b/README.md index ae2a6be..e474a37 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,6 @@ -# go-server +# Go Server Framework -Package `server` provides a - -## Install - -```bash -go get github.com/remerge/go-server -``` +Package `server` provides an opinionated server framework in Go. ## Usage diff --git a/go.mk b/go.mk index 9ac7e35..7b57018 100644 --- a/go.mk +++ b/go.mk @@ -75,10 +75,10 @@ GOFMT_EXCLUDES ?= %.pb.go %_gen.go %_easyjson.go GOFMT_SOURCES = $(filter-out $(GOFMT_EXCLUDES),$(GO_SOURCES)) .fmt-gofmt: $(GOFMT_SOURCES) ## format go sources - gofmt -w -s -l $^ + if [[ "$(GOFMT_SOURCES)" != "" ]]; then gofmt -w -s -l $(GOFMT_SOURCES); fi .fmt-goimports: $(GOIMPORTS_LINTER) $(GOFMT_SOURCES) ## group and correct imports - $(TOOLS)/$< -w -l $(GOFMT_SOURCES) + if [[ "$(GOFMT_SOURCES)" != "" ]]; then $(TOOLS)/$< -w -l $(GOFMT_SOURCES); fi # Dependencies cleanup