Skip to content

Commit a63cff4

Browse files
authored
chore: bump go to 1.23 (#650)
1 parent 6403f4d commit a63cff4

11 files changed

+164
-146
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
uses: actions/checkout@v4
1818
- name: Setup Go
1919
id: go
20-
uses: actions/setup-go@v4
20+
uses: actions/setup-go@v5
2121
with:
22-
go-version: ^1.22
22+
go-version: ^1.23
2323
- name: Install golangci-lint
2424
uses: golangci/golangci-lint-action@v6
2525
with:
26-
version: v1.59
26+
version: v1.61
2727
- name: Install dependency
2828
run: if [ $(uname) == "Darwin" ]; then brew install gnu-sed ;fi
2929
- name: Build

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- name: Check out code
1515
uses: actions/checkout@v4
1616
- name: Setup Go
17-
uses: actions/setup-go@v4
17+
uses: actions/setup-go@v5
1818
with:
19-
go-version: ^1.22
19+
go-version: ^1.23
2020

2121
- name: Set GOVERSION
2222
run: echo "GOVERSION=$(go version | sed -r 's/go version go(.*)\ .*/\1/')" >> $GITHUB_ENV
@@ -51,4 +51,4 @@ jobs:
5151
platforms: linux/amd64,linux/arm64
5252
tags: cosmtrek/air:${{ env.VERSION }}
5353
- name: Show docker image digest
54-
run: echo ${{ steps.docker_build.outputs.digest }}
54+
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/smoke_test_reuse_job.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
uses: actions/checkout@v4
1717
- name: Setup Go
1818
id: go
19-
uses: actions/setup-go@v4
19+
uses: actions/setup-go@v5
2020
with:
21-
go-version: ^1.22
21+
go-version: ^1.23
2222
- name: Install
2323
run: make install
2424
- name: Check rebuild
@@ -34,4 +34,4 @@ jobs:
3434
- uses: nick-invision/assert-action@v2
3535
with:
3636
expected: "PASS"
37-
actual: ${{ steps.check_rebuild.outputs.value }}
37+
actual: ${{ steps.check_rebuild.outputs.value }}

.github/workflows/smoke_test_reuse_job_windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
id: go
1919
uses: actions/setup-go@v4
2020
with:
21-
go-version: ^1.22
21+
go-version: ^1.23
2222
- name: Setup Python
2323
uses: actions/setup-python@v5
2424
with:

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
FROM golang:1.22 AS builder
1+
FROM golang:1.23 AS builder
22

33
LABEL maintainer="Rick Yu <cosmtrek@gmail.com>"
44

55
ENV GOPATH /go
66
ENV GO111MODULE on
77

8-
COPY . /go/src/github.com/cosmtrek/air
9-
WORKDIR /go/src/github.com/cosmtrek/air
8+
COPY . /go/src/github.com/air-verse/air
9+
WORKDIR /go/src/github.com/air-verse/air
1010

1111
RUN --mount=type=cache,target=/go/pkg/mod go mod download
1212

1313
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build make ci && make install
1414

15-
FROM golang:1.22
15+
FROM golang:1.23
1616

1717
COPY --from=builder /go/bin/air /go/bin/air
1818

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LDFLAGS += -X "main.airVersion=$(AIRVER)"
44
LDFLAGS += -X "main.goVersion=$(shell go version | sed -r 's/go version go(.*)\ .*/\1/')"
55

66
GO := GO111MODULE=on CGO_ENABLED=0 go
7-
GOLANGCI_LINT_VERSION = v1.56.2
7+
GOLANGCI_LINT_VERSION = v1.61.0
88

99
.PHONY: init
1010
init: install-golangci-lint

README-zh_cn.md

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Air [![Go](https://github.com/air-verse/air/workflows/Go/badge.svg)](https://github.com/air-verse/air/actions?query=workflow%3AGo+branch%3Amaster) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dcb95264cc504cad9c2a3d8b0795a7f8)](https://www.codacy.com/gh/air-verse/air/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=air-verse/air&amp;utm_campaign=Badge_Grade) [![Go Report Card](https://goreportcard.com/badge/github.com/air-verse/air)](https://goreportcard.com/report/github.com/air-verse/air) [![codecov](https://codecov.io/gh/air-verse/air/branch/master/graph/badge.svg)](https://codecov.io/gh/air-verse/air)
1+
# Air [![Go](https://github.com/air-verse/air/workflows/Go/badge.svg)](https://github.com/air-verse/air/actions?query=workflow%3AGo+branch%3Amaster) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dcb95264cc504cad9c2a3d8b0795a7f8)](https://www.codacy.com/gh/air-verse/air/dashboard?utm_source=github.com&utm_medium=referral&utm_content=air-verse/air&utm_campaign=Badge_Grade) [![Go Report Card](https://goreportcard.com/badge/github.com/air-verse/air)](https://goreportcard.com/report/github.com/air-verse/air) [![codecov](https://codecov.io/gh/air-verse/air/branch/master/graph/badge.svg)](https://codecov.io/gh/air-verse/air)
22

33
:cloud: 热重载 Go 应用的工具
44

@@ -16,11 +16,11 @@ Air 是为 Go 应用开发设计的另外一个热重载的命令行工具。只
1616

1717
## 特色
1818

19-
* 彩色的日志输出
20-
* 自定义构建或必要的命令
21-
* 支持外部子目录
22-
* 在 Air 启动之后,允许监听新创建的路径
23-
* 更棒的构建过程
19+
- 彩色的日志输出
20+
- 自定义构建或必要的命令
21+
- 支持外部子目录
22+
- 在 Air 启动之后,允许监听新创建的路径
23+
- 更棒的构建过程
2424

2525
### 使用参数覆盖指定配置
2626

@@ -42,7 +42,7 @@ air --build.cmd "go build -o bin/api cmd/run.go" --build.bin "./bin/api" --build
4242

4343
### 使用 `go install` (推荐)
4444

45-
使用 go 1.22 或更高版本:
45+
使用 go 1.23 或更高版本:
4646

4747
```shell
4848
go install github.com/air-verse/air@latest
@@ -60,7 +60,6 @@ curl -sSfL https://raw.githubusercontent.com/air-verse/air/master/install.sh | s
6060
air -v
6161
```
6262

63-
6463
### 使用 [goblin.run](https://goblin.run)
6564

6665
```shell
@@ -122,6 +121,7 @@ AIR_PORT=8080 air -c "config.toml"
122121
```
123122

124123
这将用当前目录替换 `$PWD``$AIR_PORT` 是要发布的端口,而 `$@` 用于接受应用程序本身的参数,例如 `-c`
124+
125125
</details>
126126

127127
## 使用方法
@@ -205,7 +205,7 @@ services:
205205

206206
```Dockerfile
207207
# 选择你想要的版本,>= 1.16
208-
FROM golang:1.22-alpine
208+
FROM golang:1.23-alpine
209209
210210
WORKDIR /app
211211
@@ -259,12 +259,11 @@ export PATH=$PATH:$(go env GOPATH)/bin <---- 请确认这行在您的配置信
259259

260260
### 如何在静态文件更改时自动重新加载浏览器?
261261

262-
263262
请参考 [#512](https://github.com/cosmtrek/air/issues/512).
264263

265-
* 确保你的静态文件在 `include_dir`、`include_ext` 或 `include_file` 中。
266-
* 确保你的 HTML 有一个 `</body>` 标签。
267-
* 通过配置以下内容开启代理:
264+
- 确保你的静态文件在 `include_dir`、`include_ext` 或 `include_file` 中。
265+
- 确保你的 HTML 有一个 `</body>` 标签。
266+
- 通过配置以下内容开启代理:
268267

269268
```toml
270269
[proxy]

README-zh_tw.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# :cloud: Air - Live reload for Go apps
22

3-
[![Go](https://github.com/air-verse/air/actions/workflows/release.yml/badge.svg)](https://github.com/air-verse/air/actions?query=workflow%3AGo+branch%3Amaster) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dcb95264cc504cad9c2a3d8b0795a7f8)](https://www.codacy.com/gh/air-verse/air/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=air-verse/air&amp;utm_campaign=Badge_Grade) [![Go Report Card](https://goreportcard.com/badge/github.com/air-verse/air)](https://goreportcard.com/report/github.com/air-verse/air) [![codecov](https://codecov.io/gh/air-verse/air/branch/master/graph/badge.svg)](https://codecov.io/gh/air-verse/air)
3+
[![Go](https://github.com/air-verse/air/actions/workflows/release.yml/badge.svg)](https://github.com/air-verse/air/actions?query=workflow%3AGo+branch%3Amaster) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dcb95264cc504cad9c2a3d8b0795a7f8)](https://www.codacy.com/gh/air-verse/air/dashboard?utm_source=github.com&utm_medium=referral&utm_content=air-verse/air&utm_campaign=Badge_Grade) [![Go Report Card](https://goreportcard.com/badge/github.com/air-verse/air)](https://goreportcard.com/report/github.com/air-verse/air) [![codecov](https://codecov.io/gh/air-verse/air/branch/master/graph/badge.svg)](https://codecov.io/gh/air-verse/air)
44

55
![air](docs/air.png)
66

@@ -16,11 +16,11 @@ Air 是一個另類的自動重新編譯執行命令列工具,用於開發 Go
1616

1717
## 功能列表
1818

19-
* 彩色的日誌輸出
20-
* 自訂建立或任何命令
21-
* 支援排除子目錄
22-
* 允許在 Air 開始後監視新目錄
23-
* 更佳的建置過程
19+
- 彩色的日誌輸出
20+
- 自訂建立或任何命令
21+
- 支援排除子目錄
22+
- 允許在 Air 開始後監視新目錄
23+
- 更佳的建置過程
2424

2525
### 用參數覆寫指定的配置
2626

@@ -42,7 +42,7 @@ air --build.cmd "go build -o bin/api cmd/run.go" --build.bin "./bin/api" --build
4242

4343
### 使用 `go install` (推薦)
4444

45-
需要使用 go 1.22 或更高版本:
45+
需要使用 go 1.23 或更高版本:
4646

4747
```bash
4848
go install github.com/air-verse/air@latest

README.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# :cloud: Air - Live reload for Go apps
22

3-
[![Go](https://github.com/air-verse/air/actions/workflows/release.yml/badge.svg)](https://github.com/air-verse/air/actions?query=workflow%3AGo+branch%3Amaster) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dcb95264cc504cad9c2a3d8b0795a7f8)](https://www.codacy.com/gh/air-verse/air/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=air-verse/air&amp;utm_campaign=Badge_Grade) [![Go Report Card](https://goreportcard.com/badge/github.com/air-verse/air)](https://goreportcard.com/report/github.com/air-verse/air) [![codecov](https://codecov.io/gh/air-verse/air/branch/master/graph/badge.svg)](https://codecov.io/gh/air-verse/air)
3+
[![Go](https://github.com/air-verse/air/actions/workflows/release.yml/badge.svg)](https://github.com/air-verse/air/actions?query=workflow%3AGo+branch%3Amaster) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/dcb95264cc504cad9c2a3d8b0795a7f8)](https://www.codacy.com/gh/air-verse/air/dashboard?utm_source=github.com&utm_medium=referral&utm_content=air-verse/air&utm_campaign=Badge_Grade) [![Go Report Card](https://goreportcard.com/badge/github.com/air-verse/air)](https://goreportcard.com/report/github.com/air-verse/air) [![codecov](https://codecov.io/gh/air-verse/air/branch/master/graph/badge.svg)](https://codecov.io/gh/air-verse/air)
44

55
![air](docs/air.png)
66

@@ -20,11 +20,11 @@ Note: This tool has nothing to do with hot-deploy for production.
2020

2121
## Features
2222

23-
* Colorful log output
24-
* Customize build or any command
25-
* Support excluding subdirectories
26-
* Allow watching new directories after Air started
27-
* Better building process
23+
- Colorful log output
24+
- Customize build or any command
25+
- Support excluding subdirectories
26+
- Allow watching new directories after Air started
27+
- Better building process
2828

2929
### Overwrite specify configuration from arguments
3030

@@ -46,7 +46,7 @@ air --build.cmd "go build -o bin/api cmd/run.go" --build.bin "./bin/api" --build
4646

4747
### Via `go install` (Recommended)
4848

49-
With go 1.22 or higher:
49+
With go 1.23 or higher:
5050

5151
```bash
5252
go install github.com/air-verse/air@latest
@@ -209,7 +209,7 @@ services:
209209

210210
```Dockerfile
211211
# Choose whatever you want, version >= 1.16
212-
FROM golang:1.22-alpine
212+
FROM golang:1.23-alpine
213213
214214
WORKDIR /app
215215
@@ -263,12 +263,11 @@ Should use `\` to escape the `' in the bin. related issue: [#305](https://github
263263

264264
### How to Reload the Browser Automatically on Static File Changes
265265

266-
267266
Refer to issue [#512](https://github.com/air-verse/air/issues/512) for additional details.
268267

269-
* Ensure your static files in `include_dir`, `include_ext`, or `include_file`.
270-
* Ensure your HTML has a `</body>` tag
271-
* Activate the proxy by configuring the following config:
268+
- Ensure your static files in `include_dir`, `include_ext`, or `include_file`.
269+
- Ensure your HTML has a `</body>` tag
270+
- Activate the proxy by configuring the following config:
272271

273272
```toml
274273
[proxy]

go.mod

+25-15
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,46 @@
11
module github.com/air-verse/air
22

3-
go 1.22
3+
go 1.23
44

55
require (
6-
dario.cat/mergo v1.0.0
7-
github.com/creack/pty v1.1.21
8-
github.com/fatih/color v1.16.0
6+
dario.cat/mergo v1.0.1
7+
github.com/creack/pty v1.1.23
8+
github.com/fatih/color v1.17.0
99
github.com/fsnotify/fsnotify v1.7.0
10-
github.com/gohugoio/hugo v0.123.3
10+
github.com/gohugoio/hugo v0.134.3
1111
github.com/pelletier/go-toml v1.9.5
12-
github.com/stretchr/testify v1.8.4
12+
github.com/stretchr/testify v1.9.0
1313
)
1414

1515
require (
16+
github.com/bep/debounce v1.2.1 // indirect
1617
github.com/bep/godartsass v1.2.0 // indirect
17-
github.com/bep/godartsass/v2 v2.0.0 // indirect
18-
github.com/bep/golibsass v1.1.1 // indirect
18+
github.com/bep/godartsass/v2 v2.1.0 // indirect
19+
github.com/bep/golibsass v1.2.0 // indirect
20+
github.com/bep/gowebp v0.4.0 // indirect
21+
github.com/bep/lazycache v0.5.0 // indirect
1922
github.com/cli/safeexec v1.0.1 // indirect
2023
github.com/davecgh/go-spew v1.1.1 // indirect
24+
github.com/dlclark/regexp2 v1.11.4 // indirect
25+
github.com/getkin/kin-openapi v0.127.0 // indirect
26+
github.com/gobuffalo/flect v1.0.3 // indirect
2127
github.com/gobwas/glob v0.2.3 // indirect
2228
github.com/mattn/go-colorable v0.1.13 // indirect
2329
github.com/mattn/go-isatty v0.0.20 // indirect
24-
github.com/mitchellh/hashstructure v1.1.0 // indirect
25-
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
30+
github.com/mattn/go-runewidth v0.0.16 // indirect
31+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
2632
github.com/pmezard/go-difflib v1.0.0 // indirect
33+
github.com/rivo/uniseg v0.4.7 // indirect
2734
github.com/spf13/afero v1.11.0 // indirect
28-
github.com/spf13/cast v1.6.0 // indirect
29-
github.com/tdewolff/parse/v2 v2.7.12 // indirect
35+
github.com/spf13/cast v1.7.0 // indirect
36+
github.com/tdewolff/parse/v2 v2.7.15 // indirect
3037
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 // indirect
31-
golang.org/x/sys v0.17.0 // indirect
32-
golang.org/x/text v0.14.0 // indirect
33-
google.golang.org/protobuf v1.33.0 // indirect
38+
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
39+
golang.org/x/image v0.20.0 // indirect
40+
golang.org/x/sys v0.25.0 // indirect
41+
golang.org/x/text v0.18.0 // indirect
42+
golang.org/x/tools v0.25.0 // indirect
43+
google.golang.org/protobuf v1.34.2 // indirect
3444
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
3545
gopkg.in/yaml.v3 v3.0.1 // indirect
3646
)

0 commit comments

Comments
 (0)