Skip to content

Upgrade go to 1.24.6 and fix linters#7

Draft
friedrichg wants to merge 4 commits intomasterfrom
upgrade-go
Draft

Upgrade go to 1.24.6 and fix linters#7
friedrichg wants to merge 4 commits intomasterfrom
upgrade-go

Conversation

@friedrichg
Copy link
Copy Markdown
Member

No description provided.

@friedrichg friedrichg changed the title Upgrade go to 1.24.6 Upgrade go to 1.24.6 and fix linters Sep 8, 2025
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Comment thread exec/exec.go
@@ -1,35 +0,0 @@
package exec
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cortexproject/cortex doesn't use this

Comment thread mflag/flag.go

// Add a blank line between cmd description and list of options
if fs.FlagCount() > 0 {
fmt.Fprintln(writer, "")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part appears to be part of the older docker project. I bet there is an updated version somewhere. Not fixing the bugs in this PR

Comment thread network/interface.go
@@ -1,33 +0,0 @@
package network
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cortexproject/cortex doesn't use this

Comment thread test/diff.go
@@ -1,24 +0,0 @@
package test
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cortexproject/cortex doesn't use this

Comment thread fs/fs.go
if err != nil {
return nil, err
}
defer fh.Close()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fs/fs.go:34:16: Error return value of `fh.Close` is not checked (errcheck)
	defer fh.Close()

But cortexproject/cortex doesn't use this, so let's remove it

Comment thread exec/exec.go
}

func (c *realCmd) SetEnv(env []string) {
c.Cmd.Env = env
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exec/exec.go:34:4: QF1008: could remove embedded field "Cmd" from selector (staticcheck)
	c.Cmd.Env = env

Comment thread test/fs/fs.go
head, tail := split(path)
fs, ok := p.entries[head]
if !ok {
return nil, fmt.Errorf("Not found: %s", path)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/fs/fs.go:89:15: ST1005: error strings should not be capitalized (staticcheck)
		return nil, fmt.Errorf("Not found: %s", path)

Comment thread test/fs/fs.go
head, tail := split(path)
fs, ok := p.entries[head]
if !ok {
return nil, fmt.Errorf("Not found: %s", path)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/fs/fs.go:117:15: ST1005: error strings should not be capitalized (staticcheck)
		return nil, fmt.Errorf("Not found: %s", path)

Comment thread test/fs/fs.go

func (p dir) ReadFile(path string) ([]byte, error) {
if path == "/" {
return nil, fmt.Errorf("I'm a directory")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/fs/fs.go:130:15: ST1005: error strings should not be capitalized (staticcheck)
		return nil, fmt.Errorf("I'm a directory")

Comment thread tools/runner/runner.go
fmt.Printf("Error updating scheduler: %v\n", err)
} else {
resp.Body.Close()
resp.Body.Close() //nolint:errcheck
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea if changing this means anything

@friedrichg friedrichg marked this pull request as draft September 8, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant