Skip to content

fix: dereference *string in fmt.Errorf for HaChassisGroup#36

Open
Dong Ma (larainema) wants to merge 1 commit intomainfrom
fix/govet-ha-chassis-group
Open

fix: dereference *string in fmt.Errorf for HaChassisGroup#36
Dong Ma (larainema) wants to merge 1 commit intomainfrom
fix/govet-ha-chassis-group

Conversation

@larainema
Copy link
Copy Markdown
Member

Problem

CI has been failing since commit 162d467 (Sep 16, 2025) due to a govet error:

fmt.Errorf format %q has arg lrp.HaChassisGroup of wrong type *string

Both golangci-lint and go-test jobs fail because of this. This also causes StepSecurity PR #35 to fail.

Fix

Dereference lrp.HaChassisGroup to *lrp.HaChassisGroup in the fmt.Errorf call at line 206, since the nil check is already done on line 203.

- Dereference lrp.HaChassisGroup to *lrp.HaChassisGroup in fmt.Errorf
  (govet: %q with *string)
- Add nil check for gatewayPortInfo to return a proper error instead of
  panicking with nil pointer dereference when no gateway port is found

Both issues were introduced in 162d467 (Sep 16, 2025).

Signed-off-by: Dong Ma <dong.ma@vexxhost.com>
Signed-off-by: Dong Ma <winterma.dong@gmail.com>
@larainema Dong Ma (larainema) force-pushed the fix/govet-ha-chassis-group branch from ad40e91 to 1630fbc Compare March 6, 2026 04:47
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