Skip to content

Commit

Permalink
chore(annotations): lukaslint
Browse files Browse the repository at this point in the history
  • Loading branch information
bahlo committed Jun 12, 2024
1 parent 2f97669 commit a056d70
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions axiom/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ func (a *AnnotationsService) Create(ctx context.Context, annotation *AnnotationC
return &res, nil
}

// AnnotationsFilter filters annotations on the [`List`] method.
// AnnotationsFilter filters annotations on the [AnnotationsService.List] method.
type AnnotationsFilter struct {
Datasets []string `url:"datasets"`
Start *time.Time `url:"start"`
End *time.Time `url:"start"`
Datasets []string `url:"datasets"`
Start time.Time `url:"start"`
End time.Time `url:"start"`
}

// List annotations.
Expand All @@ -104,10 +104,10 @@ func (a *AnnotationsService) List(ctx context.Context, filter *AnnotationsFilter
if len(filter.Datasets) > 0 {
attributes = append(attributes, attribute.StringSlice("axiom.datasets", filter.Datasets))
}
if filter.Start != nil {
if !filter.Start.IsZero() {
attributes = append(attributes, attribute.String("axiom.start", filter.Start.String()))
}
if filter.End != nil {
if !filter.End.IsZero() {
attributes = append(attributes, attribute.String("axiom.end", filter.End.String()))
}
}
Expand Down

0 comments on commit a056d70

Please sign in to comment.