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

chore: add Go 1.22 support #1762

Merged
merged 2 commits into from
Feb 15, 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/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: ["1.19", "1.20", "1.21"]
go: ["1.19", "1.20", "1.21", "1.22"]
tags: ["", "finder", "viper_bind_struct"]

steps:
Expand Down Expand Up @@ -75,12 +75,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "1.21"
go-version: "1.22"

- name: Lint
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: v1.54.2
version: v1.56.1

dev:
name: Developer environment
Expand Down
62 changes: 40 additions & 22 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
default = {
languages = {
go.enable = true;
go.package = pkgs.go_1_22;
};

pre-commit.hooks = {
Expand Down
6 changes: 2 additions & 4 deletions viper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ func TestWatchFile(t *testing.T) {
wg := sync.WaitGroup{}
wg.Add(1)
var wgDoneOnce sync.Once // OnConfigChange is called twice on Windows
v.OnConfigChange(func(in fsnotify.Event) {
v.OnConfigChange(func(_ fsnotify.Event) {
t.Logf("config file changed")
wgDoneOnce.Do(func() {
wg.Done()
Expand All @@ -2450,7 +2450,7 @@ func TestWatchFile(t *testing.T) {
v, watchDir, _ := newViperWithSymlinkedConfigFile(t)
wg := sync.WaitGroup{}
v.WatchConfig()
v.OnConfigChange(func(in fsnotify.Event) {
v.OnConfigChange(func(_ fsnotify.Event) {
t.Logf("config file changed")
wg.Done()
})
Expand Down Expand Up @@ -2689,8 +2689,6 @@ func BenchmarkGetBoolFromMap(b *testing.B) {
}

// Skip some tests on Windows that kept failing when Windows was added to the CI as a target.
//
//nolint:gocritic // sloppyTestFuncName
func skipWindows(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Skip test on Windows")
Expand Down
Loading