Skip to content

Commit 6838e75

Browse files
authored
Merge pull request #59 from NETWAYS/chore/go1-23
Bump to Go 1.23
2 parents c1bd475 + 8044a79 commit 6838e75

File tree

9 files changed

+9
-7
lines changed

9 files changed

+9
-7
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Go
2020
uses: actions/setup-go@v5
2121
with:
22-
go-version: 1.21
22+
go-version: 1.23
2323

2424
- name: Test
2525
run: go test -v ./...

.github/workflows/golangci-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: golangci-lint
1818
uses: golangci/golangci-lint-action@v6
1919
with:
20-
version: v1.54
20+
version: v1.61

.golangci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ linters:
2222
- goerr113
2323
- gofumpt
2424
- gomnd
25+
- mnd
2526
- lll
2627
- musttag
2728
- nakedret

cmd/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func (c *Config) NewClient() *client.Client {
104104
// Using a BasicAuth for authentication
105105
if c.Username != "" {
106106
if c.Password == "" {
107+
// nolint: perfsprint
107108
check.ExitError(fmt.Errorf("specify the user name and password for server authentication"))
108109
}
109110

cmd/health.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The cluster health status is:
1717
red = CRITICAL`,
1818
Example: " check_elasticsearch health --hostname \"127.0.0.1\" --port 9200 --username \"exampleUser\" " +
1919
"--password \"examplePass\" --tls --insecure",
20-
Run: func(cmd *cobra.Command, args []string) {
20+
Run: func(_ *cobra.Command, _ []string) {
2121
client := cliConfig.NewClient()
2222

2323
health, err := client.Health()

cmd/ingest.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var ingestCmd = &cobra.Command{
2323
Use: "ingest",
2424
Short: "Checks the ingest statistics of Ingest Pipelines",
2525
Long: `Checks the ingest statistics of Ingest Pipelines`,
26-
Run: func(cmd *cobra.Command, args []string) {
26+
Run: func(_ *cobra.Command, _ []string) {
2727
var (
2828
rc int
2929
output string

cmd/query.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For more information to the syntax, please visit:
3232
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html`,
3333
Example: "check_elasticsearch query -q \"event.dataset:sample_web_logs and @timestamp:[now-5m TO now]\" " +
3434
"-I \"kibana_sample_data_logs\" -k \"message\"",
35-
Run: func(cmd *cobra.Command, args []string) {
35+
Run: func(_ *cobra.Command, _ []string) {
3636
var (
3737
rc int
3838
output strings.Builder

cmd/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var (
1414
var rootCmd = &cobra.Command{
1515
Use: "check_elasticsearch",
1616
Short: "Icinga check plugin to check Elasticsearch",
17-
PersistentPreRun: func(cmd *cobra.Command, args []string) {
17+
PersistentPreRun: func(_ *cobra.Command, _ []string) {
1818
go check.HandleTimeout(timeout)
1919
},
2020
Run: Help,

cmd/snapshot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $ check_elasticsearch snapshot --all
3232
$ check_elasticsearch snapshot --number 5
3333
[WARNING] - At least one evaluated snapshot is in state PARTIAL
3434
`,
35-
Run: func(cmd *cobra.Command, args []string) {
35+
Run: func(cmd *cobra.Command, _ []string) {
3636
repository, _ := cmd.Flags().GetString("repository")
3737
snapshot, _ := cmd.Flags().GetString("snapshot")
3838
numberOfSnapshots, _ := cmd.Flags().GetInt("number")

0 commit comments

Comments
 (0)