Skip to content

Commit

Permalink
chore: remove GOPATH support and go1.17 (#1536)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubogdan committed Apr 5, 2023
1 parent 72d07cd commit 27719cd
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 135 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/ci.yml
Expand Up @@ -15,36 +15,18 @@ jobs:
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 }}
- 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)
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -54,7 +54,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.17 or newer).
To build from source you need [Go](https://golang.org/dl/) (1.18 or newer).

Or download a pre-compiled binary from the [release page](https://github.com/swaggo/swag/releases).

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

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

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

Expand Down
3 changes: 0 additions & 3 deletions generics.go
@@ -1,6 +1,3 @@
//go:build go1.18
// +build go1.18

package swag

import (
Expand Down
42 changes: 0 additions & 42 deletions generics_other.go

This file was deleted.

67 changes: 0 additions & 67 deletions generics_other_test.go

This file was deleted.

3 changes: 0 additions & 3 deletions generics_test.go
@@ -1,6 +1,3 @@
//go:build go1.18
// +build go1.18

package swag

import (
Expand Down

0 comments on commit 27719cd

Please sign in to comment.