influxdata / influxdata/kapacitor
Support standard time formats in Kapacitor templating
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
i was trying to format my `{{.Time}}` template and wanted to use `{{.Time.format time.RFC3339}}` but i kept getting an error telling me that `time function was not defined`.
I was able to get it working using `{{ .Time.Format "2006-01-02T15:04:05.999999Z" }}`
https://golang.org/pkg/time/#Time.Format
Contributor guide
Research direction
Start at Kapacitor's templating entry point for expressions such as `.Time.format time.RFC3339` and the existing `.Time.Format "2006-01-02T15:04:05.999999Z"` form. Check the Go time package documentation for standard formats, then verify that a template using `time.RFC3339` renders without the current undefined-function error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100