Skip to content

min, empty, tuple, dict, more date functions, and better math

Compare
Choose a tag to compare
@technosophos technosophos released this 29 Mar 04:58
· 439 commits to master since this release

This release adds a number of new functions:

  • min complements max (formerly biggest)
  • empty indicates that a value is the empty value for its type
  • tuple creates a tuple inside of a template: {{$t := tuple "a", "b" "c"}}
  • dict creates a dictionary inside of a template {{$d := dict "key1" "val1" "key2" "val2"}}
  • Date formatters have been added for HTML dates (as used in date input fields)
  • Integer math functions can convert from a number of types, including string (via strconv.ParseInt).

Because we switched from int to int64 as the return value for all integer math functions, the library's major version number has been incremented.