Skip to content

Commit

Permalink
Merge #130
Browse files Browse the repository at this point in the history
130: Fix build on go1.17 r=xen0n a=xen0n



Co-authored-by: WANG Xuerui <wangxuerui@qiniu.com>
  • Loading branch information
bors[bot] and xen0n authored Dec 23, 2022
2 parents da32b1f + a964741 commit 552722d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,36 @@ jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.17', 'oldstable', 'stable' ]
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: ${{ matrix.go }}

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

# Added to summarize the matrix (otherwise we would need to list every single
# job in bors.toml)
# thanks https://forum.bors.tech/t/bors-with-github-workflows/426/4
tests-result:
name: Tests result
if: always()
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Mark the job as a success
if: needs.build.result == 'success'
run: exit 0
- name: Mark the job as a failure
if: needs.build.result == 'failure'
run: exit 1
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ in at least 2 of Qiniu's internal systems.
为什么人们总是喜欢写死请求 `Host`、用全局量、为拆包而拆包甚至不惜公开内部方法呢?


## Supported Go versions

本库的 v1.x 分支最低支持到 `go1.17`

CI 会在 `go1.17` 和 Go 的当前稳定版本、上一个稳定版本上跑测试,只有测试全部通过才可能合并 PR。

## Features

* 支持最近 3 个 Go 版本
* 包名短
* 支持覆盖 API `Host`,用于自己拦一层网关、临时调试等等奇葩需求
* 支持使用自定义 `http.Client`
Expand Down
3 changes: 2 additions & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
status = [
"build",
"Tests result",
]
timeout_sec = 300
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.17

require (
github.com/PuerkitoBio/goquery v1.8.0
github.com/cenkalti/backoff/v4 v4.2.0
github.com/cenkalti/backoff/v4 v4.1.3
github.com/russross/blackfriday/v2 v2.1.0
github.com/smartystreets/goconvey v1.7.2
github.com/urfave/cli/v2 v2.23.7
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0g
github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4=
github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
Expand Down

0 comments on commit 552722d

Please sign in to comment.