Skip to content

Commit de9424f

Browse files
committed
Go 1.21
1 parent 8c8e2fd commit de9424f

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
1717
with:
18-
go-version: "1.20"
18+
go-version: "1.21"
1919
id: go
2020

2121
- name: Check out code into the Go module directory

cmd/knot8/file.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package main
66
import (
77
"fmt"
88
"io"
9-
"io/ioutil"
109
"os"
1110
"path/filepath"
1211
"sort"
@@ -132,5 +131,5 @@ func onlyFiles(paths []string) ([]string, error) {
132131
// (which are the supported encodings of YAML),
133132
func readAllTranscode(r io.Reader) ([]byte, error) {
134133
t := unicode.BOMOverride(runes.ReplaceIllFormed())
135-
return ioutil.ReadAll(transform.NewReader(r, t))
134+
return io.ReadAll(transform.NewReader(r, t))
136135
}

cmd/knot8/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func settersFromFiles(paths []string) ([]Setter, error) {
176176
}
177177

178178
func parseSimplifiedValues(path string) (map[string]string, error) {
179-
b, err := ioutil.ReadFile(path)
179+
b, err := os.ReadFile(path)
180180
if err != nil {
181181
return nil, err
182182
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module knot8.io
22

3-
go 1.19
3+
go 1.21
44

55
require (
66
github.com/alecthomas/kong v0.7.1

go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,11 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
183183
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
184184
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
185185
github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0=
186+
github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA=
186187
github.com/alecthomas/kong v0.7.1 h1:azoTh0IOfwlAX3qN9sHWTxACE2oV8Bg2gAwBsMwDQY4=
187188
github.com/alecthomas/kong v0.7.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=
188189
github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE=
190+
github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
189191
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
190192
github.com/atomatt/yaml v0.0.0-20200228174225-55c5cf55e3ee h1:vOFcdf/Iqih81E224SKRoFCkgJJ/CqPW+DkkgXrVJ90=
191193
github.com/atomatt/yaml v0.0.0-20200228174225-55c5cf55e3ee/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -344,6 +346,7 @@ github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09
344346
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
345347
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
346348
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
349+
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
347350
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
348351
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
349352
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=

pkg/lensed/base64.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"bytes"
88
"encoding/base64"
99
"fmt"
10-
"io/ioutil"
10+
"io"
1111
)
1212

1313
// Base64Lens implements the "base64" lens.
@@ -17,7 +17,7 @@ type Base64Lens struct{}
1717
func (Base64Lens) Apply(src []byte, vals []Setter) ([]byte, error) {
1818
enc := base64.StdEncoding
1919

20-
b, err := ioutil.ReadAll(base64.NewDecoder(enc, bytes.NewReader(src)))
20+
b, err := io.ReadAll(base64.NewDecoder(enc, bytes.NewReader(src)))
2121
if err != nil {
2222
return nil, err
2323
}

0 commit comments

Comments
 (0)