Commit Graph

5 Commits

Author SHA1 Message Date
Jhon Honce df0bf9adef Updated report.template to handle newlines
Previous code and tests did not reflect actual users input and expected
output.

Add remaining compatibilty golang template funcs

- json
- pad
- truncate

https://bugzilla.redhat.com/show_bug.cgi?id=1922077
Fixes #8702

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-02-04 14:13:44 -07:00
Jhon Honce 89c438e1ea Add compatible template functions
"join":  strings.Join,
  "lower": strings.ToLower,
  "split": strings.Split,
  "title": strings.Title,
  "upper": strings.ToUpper,

Add and update tests to exercise these additions.
Update go doc with details of usage.

Fixes #8773
Closes https://bugzilla.redhat.com/show_bug.cgi?id=1915383

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-01-29 14:07:19 -07:00
Jhon Honce 76039732ca Revert changes in 0.26.2 that broke podman
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-26 15:51:43 -07:00
Jhon Honce 595e2efa20 Fix --format corner cases
* Always Normalize --format value
* Additionaly fixed case where {{range}} with embedded \n caused
  double \n\n on output
* Updated tests to cover these cases

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-22 10:53:00 -07:00
Jhon Honce 6776ebb687 Consolidate reporting functions
From https://github.com/containers/podman/commit/ac8e6c99103e

  faith/camelcase has been archived and is no longer maintained.
  The package is sufficiently small and self-contained enough to
  maintain it in libpod.[sic]

Signed-off-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-10-13 08:58:21 -07:00