Skip to content

Commit cb094f8

Browse files
Krishnan ParthasarathiKrishnan Parthasarathi
authored andcommitted
fix: pin stringer to module-managed version in generate directives
Replace bare `stringer` invocations with `go tool stringer` so that go generate always uses the version pinned via the tool directive in go.mod (golang.org/x/tools v0.37.0) rather than whatever stringer binary happens to be on PATH.
1 parent 88eb0e2 commit cb094f8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

estream/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
package estream
2121

22-
//go:generate stringer -type=blockID -trimprefix=block
22+
//go:generate go tool stringer -type=blockID -trimprefix=block
2323

2424
type blockID int8
2525

@@ -36,7 +36,7 @@ const (
3636

3737
type checksumType uint8
3838

39-
//go:generate stringer -type=checksumType -trimprefix=checksumType
39+
//go:generate go tool stringer -type=checksumType -trimprefix=checksumType
4040

4141
const (
4242
checksumTypeNone checksumType = iota

heal-commands.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ type SetStatus struct {
364364
Disks []Disk `json:"disks"`
365365
}
366366

367-
//go:generate stringer -type=HealingDriveReason -output=heal-commands-drive-reason_gen.go -trimprefix=HealingReason $GOFILE
367+
//go:generate go tool stringer -type=HealingDriveReason -output=heal-commands-drive-reason_gen.go -trimprefix=HealingReason $GOFILE
368368
type HealingDriveReason int8
369369

370370
const (
@@ -374,7 +374,7 @@ const (
374374
HealingReasonOfflineDisk
375375
)
376376

377-
//go:generate stringer -type=OfflineReason -output=heal-commands-offline-reason_gen.go -trimprefix=OfflineReason $GOFILE
377+
//go:generate go tool stringer -type=OfflineReason -output=heal-commands-offline-reason_gen.go -trimprefix=OfflineReason $GOFILE
378378
type OfflineReason int8
379379

380380
const (
@@ -385,7 +385,7 @@ const (
385385
OfflineReasonDriveTimeout
386386
)
387387

388-
//go:generate stringer -type=OfflineDecision -output=heal-commands-offline-decision_gen.go -trimprefix=OfflineDecision $GOFILE
388+
//go:generate go tool stringer -type=OfflineDecision -output=heal-commands-offline-decision_gen.go -trimprefix=OfflineDecision $GOFILE
389389
type OfflineDecision int8
390390

391391
const (

0 commit comments

Comments
 (0)