Skip to content

Commit

Permalink
BUILD/MINOR: go: raise version to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
oktalz committed Aug 29, 2023
1 parent 773ebc7 commit 32ea0b0
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
GO_VERSION: "1.20"
GO_VERSION: "1.21"
stages:
- diff
- lint
Expand Down
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ linters:
- golint # deprecated
- interfacer # deprecated
- maligned # deprecated
- depguard

run:
skip-dirs:
- test

issues:
exclude:
- "unused-parameter: parameter 'comment' seems to be unused"
- "unused-parameter: parameter 'parts' seems to be unused"
- "unused-parameter: parameter 'parserType' seems to be unused"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT_PATH=${PWD}
GOLANGCI_LINT_VERSION=1.51.0
GOLANGCI_LINT_VERSION=1.54.2

.PHONY: generate
generate:
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
module github.com/haproxytech/config-parser/v4

go 1.19
go 1.21

require (
github.com/gofrs/flock v0.8.1
github.com/google/renameio v1.0.1
github.com/haproxytech/go-logger v1.1.0
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/text v0.9.0
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
Expand Down
3 changes: 1 addition & 2 deletions params/bind-options.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ package params

import (
"fmt"
"slices"
"strings"

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

// BindOption ...
Expand Down
2 changes: 1 addition & 1 deletion parsers/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (l *Log) Init() {
l.preComments = []string{}
}

func (l *Log) parse(line string, parts []string, comment string) (*types.Log, error) { //nolint: gocognit
func (l *Log) parse(line string, parts []string, comment string) (*types.Log, error) {
if len(parts) > 1 && parts[1] == "global" {
return &types.Log{
Global: true,
Expand Down
2 changes: 1 addition & 1 deletion parsers/option-httplog.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type OptionHTTPLog struct {
preComments []string // comments that appear before the actual line
}

func (o *OptionHTTPLog) Parse(line string, parts []string, comment string) (string, error) { //nolint:gocognit
func (o *OptionHTTPLog) Parse(line string, parts []string, comment string) (string, error) {
if len(parts) > 2 && parts[0] == "option" && parts[1] == "httplog" && parts[2] == "clf" {
o.data = &types.OptionHTTPLog{
Comment: comment,
Expand Down
2 changes: 1 addition & 1 deletion parsers/option-mysql-check.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type OptionMysqlCheck struct {
/*
option mysql-check [ user <username> [ post-41 ] ]
*/
func (s *OptionMysqlCheck) Parse(line string, parts []string, comment string) (string, error) { //nolint:gocognit
func (s *OptionMysqlCheck) Parse(line string, parts []string, comment string) (string, error) {
if len(parts) > 1 && parts[0] == "option" && parts[1] == "mysql-check" {
data := &types.OptionMysqlCheck{
Comment: comment,
Expand Down
2 changes: 1 addition & 1 deletion parsers/stick-table.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type StickTable struct {
preComments []string // comments that appear before the actual line
}

func (h *StickTable) parse(line string, parts []string, comment string) (*types.StickTable, error) { //nolint:gocognit
func (h *StickTable) parse(line string, parts []string, comment string) (*types.StickTable, error) {
if len(parts) >= 3 && parts[0] == "stick-table" && parts[1] == "type" {
index := 2
data := &types.StickTable{
Expand Down
3 changes: 1 addition & 2 deletions parsers/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ package parsers

import (
"fmt"
"slices"
"strconv"
"strings"

"golang.org/x/exp/slices"

"github.com/haproxytech/config-parser/v4/common"
"github.com/haproxytech/config-parser/v4/errors"
"github.com/haproxytech/config-parser/v4/types"
Expand Down

0 comments on commit 32ea0b0

Please sign in to comment.