Skip to content

Commit

Permalink
ci: lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Sep 4, 2024
1 parent 9756cc0 commit dc5b612
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/loghttp/push/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"go.opentelemetry.io/collector/pdata/plog"

"github.com/grafana/dskit/flagext"

util_log "github.com/grafana/loki/v3/pkg/util/log"
)

Expand Down Expand Up @@ -405,18 +406,18 @@ type fakeLimits struct {
indexAttributes []string
}

func (f *fakeLimits) RetentionPeriodFor(userID string, lbs labels.Labels) time.Duration {
func (f *fakeLimits) RetentionPeriodFor(_ string, _ labels.Labels) time.Duration {
return time.Hour
}

func (l *fakeLimits) OTLPConfig(_ string) OTLPConfig {
if len(l.indexAttributes) > 0 {
func (f *fakeLimits) OTLPConfig(_ string) OTLPConfig {
if len(f.indexAttributes) > 0 {
return OTLPConfig{
ResourceAttributes: ResourceAttributesConfig{
AttributesConfig: []AttributesConfig{
{
Action: IndexLabel,
Attributes: l.indexAttributes,
Attributes: f.indexAttributes,
},
},
},
Expand All @@ -428,13 +429,13 @@ func (l *fakeLimits) OTLPConfig(_ string) OTLPConfig {
return DefaultOTLPConfig(defaultGlobalOTLPConfig)
}

func (l *fakeLimits) DiscoverServiceName(_ string) []string {
if !l.enabled {
func (f *fakeLimits) DiscoverServiceName(_ string) []string {
if !f.enabled {
return nil
}

if len(l.labels) > 0 {
return l.labels
if len(f.labels) > 0 {
return f.labels
}

return []string{
Expand Down

0 comments on commit dc5b612

Please sign in to comment.