Skip to content

Commit

Permalink
rpk: fix linter failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
r-vasquez committed Jun 8, 2023
1 parent 7bc892c commit 2759ae4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/cli/profile/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Four modifiers are supported, "bold", "faint", "underline", and "invert".

y, ok := cfg.ActualRpkYaml()
if !ok {
errmsg = fmt.Sprintf("rpk.yaml file is missing or cannot be loaded")
errmsg = "rpk.yaml file is missing or cannot be loaded"
return
}
p := y.Profile(y.CurrentProfile)
Expand Down
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/cli/topic/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func listStartEndOffsets(cl *kgo.Client, topic string, numPartitions int, stable

// Finally, the HWM.
shards = cl.RequestSharded(context.Background(), req)
allFailed = kafka.EachShard(req, shards, func(shard kgo.ResponseShard) {
kafka.EachShard(req, shards, func(shard kgo.ResponseShard) {
resp := shard.Resp.(*kmsg.ListOffsetsResponse)
if len(resp.Topics) > 0 {
for _, partition := range resp.Topics[0].Partitions {
Expand Down
8 changes: 4 additions & 4 deletions src/go/rpk/pkg/config/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,11 +829,11 @@ func readFile(fs afero.Fs, path string) (string, []byte, error) {
return abs, file, err
}

func (p *Params) backcompatOldCloudYaml(fs afero.Fs) error {
func (*Params) backcompatOldCloudYaml(fs afero.Fs) error {
def, err := DefaultRpkYamlPath()
if err != nil {
// This error only happens if the user unset $HOME, and if they
// do that, we will avoid failing / avoid backcompat here.
//nolint:nilerr // This error only happens if the user unset $HOME, and
// if they do that, we will avoid failing / avoid backcompat here.
return nil
}

Expand Down Expand Up @@ -913,7 +913,7 @@ func (p *Params) readRpkConfig(fs afero.Fs, c *Config) error {
if p.ConfigFlag != "" {
path = p.ConfigFlag
} else if err != nil {
// If $HOME is unset, we do not read any file. If the user
//nolint:nilerr // If $HOME is unset, we do not read any file. If the user
// eventually tries to write, we fail in Write. Allowing
// $HOME to not exists allows rpk to work in CI settings
// where all config flags are being specified.
Expand Down
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/config/rpk_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,4 @@ func (d *Duration) UnmarshalText(text []byte) error {
return err
}

func (d *Duration) YamlTypeNameForTest() string { return "duration" }
func (*Duration) YamlTypeNameForTest() string { return "duration" }

0 comments on commit 2759ae4

Please sign in to comment.