Skip to content

Commit

Permalink
add helper methods for easier testing
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Oct 8, 2024
1 parent 735e384 commit a347d81
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/utils/test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package utils

import "time"

func PointerFromFloat64(a float64) *float64 {
return &a
}

func TimeMustParse(layout, timestamp string) time.Time {
t, err := time.Parse(layout, timestamp)
if err != nil {
panic(err)
}
return t
}

0 comments on commit a347d81

Please sign in to comment.