Skip to content

Commit

Permalink
upgrade to go1.21, stop directly relying on golang.org/x/exp
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiEven committed Nov 7, 2023
1 parent ebcade1 commit 025881a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@
"version": "latest",
"dockerDashComposeVersion": "none"
}
},
"customizations": {
"vscode": {
"extensions": [
"github.vscode-github-actions"
]
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/onPush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: '1.21'
- name: Generate lexer/parser files with antlr
run: ./generateParser.sh
- name: Display potential updates
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/remieven/ysgo

go 1.19
go 1.21

require (
github.com/antlr4-go/antlr/v4 v4.13.0
github.com/bradleyjkemp/cupaloy/v2 v2.8.0
github.com/go-test/deep v1.1.0
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU=
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5 changes: 2 additions & 3 deletions markup/line_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import (
"io"
"math"
"regexp"
"slices"
"strconv"
"strings"
"unicode"
"unicode/utf16"

"golang.org/x/exp/slices"
)

const (
Expand Down Expand Up @@ -229,7 +228,7 @@ func (lineParser *LineParser) buildAttributesFromMarkers(markers []attributeMark
}
}

slices.SortStableFunc(attributes, func(a, b Attribute) bool { return a.Position < b.Position })
slices.SortStableFunc(attributes, func(a, b Attribute) int { return a.Position - b.Position })

return attributes, nil
}
Expand Down

0 comments on commit 025881a

Please sign in to comment.