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

Update the minimum version of Go required to 1.17 #245

Merged
merged 1 commit into from
Sep 10, 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
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: '>=1.16.0'
go-version: '>=1.17.0'

- name: Checkout repository
uses: actions/checkout@v4

- name: Create coverage file
run: go test -coverprofile='coverage.txt' -covermode=atomic

Expand Down
6 changes: 3 additions & 3 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#### 安装使用

##### Golang 版本大于等于 1.16 (推荐)
##### Golang 版本大于等于 1.17 (推荐)

```go
// 使用 github 库
Expand All @@ -32,7 +32,7 @@ go get -u gitee.com/golang-module/carbon/v2
import "gitee.com/golang-module/carbon/v2"
```

##### Golang 版本小于 1.16 (必须)
##### Golang 版本小于 1.17 (必须)

```go
// 使用 github 库
Expand Down Expand Up @@ -1599,7 +1599,7 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for
1、v1 和 v2 版本有什么区别?
> v1 和 v2 版本的 API 没有任何区别,只是 `language.go` 里翻译资源文件内嵌的实现方式不同,v1 版本是由第三方扩展库 [packr](https://github.com/gobuffalo/packr)
> 实现的,
> v2 版本是由 `golang1.16` 后内置标准库 [embed](https://pkg.go.dev/embed) 实现的。如果你的 go 版本大于 1.16推荐使用 v2 版本,否则必须使用 v1 版本。
> v2 版本是由 `golang1.17` 后内置标准库 [embed](https://pkg.go.dev/embed) 实现的。如果你的 go 版本大于 1.17推荐使用 v2 版本,否则必须使用 v1 版本。

2、window 系统下部署二进制文件时区报错

Expand Down
8 changes: 4 additions & 4 deletions README.jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Carbon は [awesome-go](https://github.com/avelino/awesome-go#date-and-time "awe

#### インストール使用

##### Golangバージョンは1.16以上です (推奨)
##### Golangバージョンは1.17以上です (推奨)

```go
// github倉庫を使う
Expand All @@ -35,7 +35,7 @@ go get -u gitee.com/golang-module/carbon/v2
import "gitee.com/golang-module/carbon/v2"
```

##### Golangバージョンは1.16より小さいです (必要)
##### Golangバージョンは1.17より小さいです (必要)

```go
// github倉庫を使う
Expand Down Expand Up @@ -1599,8 +1599,8 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for

1、v1とv2のバージョンの違いは何ですか?
> APIのv1バージョンとv2バージョンに違いはありませんが `language.go`
> での翻訳リソースファイルの実装は異なります。v1は、サードパーティの拡張ライブラリ [packr](https://github.com/gobuffalo/packr) によって実装されています,v2は、 `golang1.16`
> の後に組み込みの標準ライブラリ [embed](https://pkg.go.dev/embed) によって実装されています。goバージョンが1.16より大きい場合は、v2バージョンを使用することをお勧めします。それ以外の場合は、v1バージョンを使用する必要があります。
> での翻訳リソースファイルの実装は異なります。v1は、サードパーティの拡張ライブラリ [packr](https://github.com/gobuffalo/packr) によって実装されています,v2は、 `golang1.17`
> の後に組み込みの標準ライブラリ [embed](https://pkg.go.dev/embed) によって実装されています。goバージョンが1.17より大きい場合は、v2バージョンを使用することをお勧めします。それ以外の場合は、v1バージョンを使用する必要があります。

#### 参考文献

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ by [awesome-go](https://github.com/avelino/awesome-go#date-and-time "awesome-go"

#### Installation

##### Go version >= 1.16 (recommend)
##### Go version >= 1.17 (recommend)

```go
// By github
Expand All @@ -35,7 +35,7 @@ go get -u gitee.com/golang-module/carbon/v2
import "gitee.com/golang-module/carbon/v2"
```

##### Go version < 1.16 (must)
##### Go version < 1.17 (must)

```go
// By github
Expand Down Expand Up @@ -1599,7 +1599,7 @@ invalid timezone "xxx", please see the file "$GOROOT/lib/time/zoneinfo.zip" for
#### FAQ

1、What is the difference between v1 and v2?
> There is no difference between v1 and v2 of the API, but the implementation of the translation resource files in `language.go` is different. The v1 is implemented by the third-party extension library [packr](https://github.com/gobuffalo/packr), and the v2 is implemented by the standard library [embed](https://pkg.go.dev/embed) after `golang1.16`. If your golang version is `1.16+`, the v2 is recommended, otherwise, the v1 is required.
> There is no difference between v1 and v2 of the API, but the implementation of the translation resource files in `language.go` is different. The v1 is implemented by the third-party extension library [packr](https://github.com/gobuffalo/packr), and the v2 is implemented by the standard library [embed](https://pkg.go.dev/embed) after `golang1.17`. If your golang version is `1.17+`, the v2 is recommended, otherwise, the v1 is required.

#### References

Expand Down
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
module github.com/golang-module/carbon/v2

go 1.16
go 1.17

require github.com/stretchr/testify v1.9.0

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading