Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump go version #1797

Merged
merged 13 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,22 @@ jobs:
test:
strategy:
matrix:
go: [ '1.18.x', '1.19.x', '1.20.x', '1.21.x' ]
go: [ '1.19.x', '1.20.x', '1.21.x', '1.22.x' ]
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
path: ./src/github.com/${{ github.repository }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: deps
working-directory: ./src/github.com/${{ github.repository }}
run: make deps
env:
GOPATH: ${{ runner.workspace }}
- name: static program analysis
working-directory: ./src/github.com/${{ github.repository }}
run: |
export PATH=$PATH:$(go env GOPATH)/bin # https://github.com/actions/setup-go/issues/14
mkdir -p $(go env GOPATH)/src/github.com/swaggo
ln -s $(pwd) $(go env GOPATH)/src/github.com/swaggo/swag
make fmt-check lint vet
env:
GOPATH: ${{ runner.workspace }}
run: make fmt-check vet
- name: build
run: make build
working-directory: ./src/github.com/${{ github.repository }}
env:
GOPATH: ${{ runner.workspace }}
- name: test
working-directory: ./src/github.com/${{ github.repository }}
run: make test
env:
GOPATH: ${{ runner.workspace }}
- name: coverage
working-directory: ./src/github.com/${{ github.repository }}
run: bash <(curl -s https://codecov.io/bash)
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ BINARY_NAME:=swag
PACKAGES:=$(shell $(GOLIST) github.com/swaggo/swag github.com/swaggo/swag/cmd/swag github.com/swaggo/swag/gen github.com/swaggo/swag/format)
GOFILES:=$(shell find . -name "*.go" -type f)

export GO111MODULE := on

all: test build

.PHONY: build
Expand Down Expand Up @@ -57,17 +55,8 @@ clean:
deps:
$(GOMODTIDY)

.PHONY: devel-deps
devel-deps:
GO111MODULE=off $(GOGET) -v -u \
golang.org/x/lint/golint

.PHONY: lint
lint: devel-deps
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;

.PHONY: vet
vet: deps devel-deps
vet: deps
$(GOVET) $(PACKAGES)

.PHONY: fmt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Swag converts Go annotations to Swagger Documentation 2.0. We've created a varie
```sh
go install github.com/swaggo/swag/cmd/swag@latest
```
To build from source you need [Go](https://golang.org/dl/) (1.18 or newer).
To build from source you need [Go](https://golang.org/dl/) (1.19 or newer).

Alternatively you can run the docker image:
```sh
Expand Down
2 changes: 1 addition & 1 deletion README_pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Swag converte anotações Go para Documentação Swagger 2.0. Criámos uma varie
```sh
go install github.com/swaggo/swag/cmd/swag@latest
```
Para construir a partir da fonte é necessário [Go](https://golang.org/dl/) (1.18 ou mais recente).
Para construir a partir da fonte é necessário [Go](https://golang.org/dl/) (1.19 ou mais recente).

Ou descarregar um binário pré-compilado a partir da [página de lançamento](https://github.com/swaggo/swag/releases).

Expand Down
2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Swag将Go的注释转换为Swagger2.0文档。我们为流行的 [Go Web Framewo
go install github.com/swaggo/swag/cmd/swag@latest
```

从源码开始构建的话,需要有Go环境(1.18及以上版本)。
从源码开始构建的话,需要有Go环境(1.19及以上版本)。

或者从github的release页面下载预编译好的二进制文件。

Expand Down
Loading