Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
demdxx committed Sep 8, 2024
1 parent a5fbd44 commit e34df0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Metric struct {

// Labels list of tags
func (m *Metric) Labels() []string {
if m.Tags == nil || len(m.Tags) == 0 || m.Tags[0] == nil || len(m.Tags[0]) == 0 {
if len(m.Tags) == 0 || len(m.Tags[0]) == 0 {
return nil
}
labels := make([]string, 0, len(m.Tags[0]))
Expand All @@ -62,7 +62,7 @@ func (m *Metric) Labels() []string {
}

func (m *Metric) tagValues() *patternkey.PatterKeys {
if m.Tags == nil || len(m.Tags) == 0 || m.Tags[0] == nil || len(m.Tags[0]) == 0 {
if len(m.Tags) == 0 || len(m.Tags[0]) == 0 {
return nil
}
vals := make([]string, 0, len(m.Tags[0]))
Expand Down
2 changes: 1 addition & 1 deletion storage/ncstreams/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func newStream(pub nc.Publisher, conf *stream.Config) (eventstream.Streamer, err
}
for _, target := range preConfig.Targets {
var fields map[string]any
if target.Fields != nil && len(target.Fields) > 0 {
if len(target.Fields) > 0 {
fields = target.Fields
}
template, err := newMessageTemplate(fields, target.Where)
Expand Down

0 comments on commit e34df0a

Please sign in to comment.