Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/bosun: add pct template function #1083

Merged
merged 1 commit into from
Jun 18, 2015
Merged

cmd/bosun: add pct template function #1083

merged 1 commit into from
Jun 18, 2015

Conversation

maddyblue
Copy link
Contributor

Also sort functions by name.

Review on Reviewable

@@ -144,6 +144,7 @@ Global template functions:

* V: performs variable expansion on the argument and returns it. Needed since normal variable expansion is not done due to the `$` character being used by the Go template syntax.
* bytes: converts the string input into a human-readable number of bytes with extension KB, MB, GB, etc.
* pct: converts the argument to a percentage. For example: `{{5.1 | pct}}` -> `5.10%`.
Copy link
Member

Choose a reason for hiding this comment

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

s/convert/format ?

Also sort functions by name.
@maddyblue
Copy link
Contributor Author

Updated.

@kylebrandt
Copy link
Member

LGTM

captncraig added a commit that referenced this pull request Jun 18, 2015
cmd/bosun: add pct template function
@captncraig captncraig merged commit 3e9002e into master Jun 18, 2015
@captncraig captncraig deleted the fmt-pct branch June 18, 2015 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants