Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

cmd/bosun: Export time.ParseDuration as ParseDuration to templates #1205

Merged
merged 1 commit into from
Jul 27, 2015

Conversation

kylebrandt
Copy link
Member

Fixes #1014

@@ -675,6 +675,7 @@ var defaultFuncs = ttemplate.FuncMap{
"short": func(v string) string {
return strings.SplitN(v, ".", 2)[0]
},
"ParseDuration": time.ParseDuration,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lower case looks to be the convention. parseDuration

@captncraig
Copy link
Contributor

@kylebrandt what problem does this solve. It looks like @ayashjorden solved #1014 without it.

@kylebrandt
Copy link
Member Author

@captncraig See the associated issue. It makes it so we don't have to do some string replacement or ugly constants in the templates.

@captncraig
Copy link
Contributor

ok, change to parseDuration and merge.

kylebrandt added a commit that referenced this pull request Jul 27, 2015
cmd/bosun: Export time.ParseDuration as ParseDuration to templates
@kylebrandt kylebrandt merged commit 1ddb94d into master Jul 27, 2015
@kylebrandt kylebrandt deleted the templateDuration branch August 7, 2015 17:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants