Skip to content

Commit 67bc542

Browse files
authored
Go 1.19 (#802)
1 parent fb6d1d6 commit 67bc542

13 files changed

Lines changed: 73 additions & 48 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- name: Setup go
1616
uses: actions/setup-go@master
1717
with:
18-
go-version: 1.18
18+
go-version: 1.19
1919
- name: Run tests with coverage
2020
run: ./ci.sh coverage -d "${GITHUB_BASE_REF-HEAD}"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go
2323
uses: actions/setup-go@v2
2424
with:
25-
go-version: 1.18
25+
go-version: 1.19
2626
- name: Login to GitHub Container Registry
2727
uses: docker/login-action@v2
2828
with:

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest']
15-
go: [ '1.17', '1.18' ]
15+
go: [ '1.18', '1.19' ]
1616
runs-on: ${{ matrix.os }}
1717
name: ${{ matrix.go }}/${{ matrix.os }}
1818
steps:

cmd/jsontoml/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// Package jsontoml is a program that converts JSON to TOML.
22
//
3-
// Usage
3+
// # Usage
44
//
55
// Reading from stdin:
66
//
7-
// cat file.json | jsontoml > file.toml
7+
// cat file.json | jsontoml > file.toml
88
//
99
// Reading from a file:
1010
//
11-
// jsontoml file.json > file.toml
11+
// jsontoml file.json > file.toml
1212
//
13-
// Installation
13+
// # Installation
1414
//
1515
// Using Go:
1616
//
17-
// go install github.com/pelletier/go-toml/v2/cmd/jsontoml@latest
17+
// go install github.com/pelletier/go-toml/v2/cmd/jsontoml@latest
1818
package main
1919

2020
import (

cmd/tomljson/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// Package tomljson is a program that converts TOML to JSON.
22
//
3-
// Usage
3+
// # Usage
44
//
55
// Reading from stdin:
66
//
7-
// cat file.toml | tomljson > file.json
7+
// cat file.toml | tomljson > file.json
88
//
99
// Reading from a file:
1010
//
11-
// tomljson file.toml > file.json
11+
// tomljson file.toml > file.json
1212
//
13-
// Installation
13+
// # Installation
1414
//
1515
// Using Go:
1616
//
17-
// go install github.com/pelletier/go-toml/v2/cmd/tomljson@latest
17+
// go install github.com/pelletier/go-toml/v2/cmd/tomljson@latest
1818
package main
1919

2020
import (

cmd/tomll/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// Package tomll is a linter program for TOML.
22
//
3-
// Usage
3+
// # Usage
44
//
55
// Reading from stdin, writing to stdout:
66
//
7-
// cat file.toml | tomll
7+
// cat file.toml | tomll
88
//
99
// Reading and updating a list of files in place:
1010
//
11-
// tomll a.toml b.toml c.toml
11+
// tomll a.toml b.toml c.toml
1212
//
13-
// Installation
13+
// # Installation
1414
//
1515
// Using Go:
1616
//
17-
// go install github.com/pelletier/go-toml/v2/cmd/tomll@latest
17+
// go install github.com/pelletier/go-toml/v2/cmd/tomll@latest
1818
package main
1919

2020
import (

cmd/tomltestgen/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// Within the go-toml package, run `go generate`. Otherwise, use:
55
//
6-
// go run github.com/pelletier/go-toml/cmd/tomltestgen -o toml_testgen_test.go
6+
// go run github.com/pelletier/go-toml/cmd/tomltestgen -o toml_testgen_test.go
77
package main
88

99
import (

errors.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func (e *DecodeError) Key() Key {
103103
//
104104
// The function copies all bytes used in DecodeError, so that document and
105105
// highlight can be freely deallocated.
106+
//
106107
//nolint:funlen
107108
func wrapDecodeError(document []byte, de *decodeError) *DecodeError {
108109
offset := danger.SubsliceOffset(document, de.highlight)

fuzz_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//go:build go1.18
2-
// +build go1.18
1+
//go:build go1.18 || go1.19
32

43
package toml_test
54

internal/ast/ast.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111
//
1212
// For example:
1313
//
14-
// it := n.Children()
15-
// for it.Next() {
16-
// it.Node()
17-
// }
14+
// it := n.Children()
15+
// for it.Next() {
16+
// it.Node()
17+
// }
1818
type Iterator struct {
1919
started bool
2020
node *Node

0 commit comments

Comments
 (0)