• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

01org / ciao / 294
66%

Build:
DEFAULT BRANCH: master
Ran 18 Nov 2016 03:48PM UTC
Jobs 1
Files 89
Run time 24s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
294

push

travis-ci

markdryan
ciao-cli: Improve template functionality

This PR adds two new functions to the template language understood
by ciao-cli:

- tojson outputs the specified object in json format, e.g., {{tojson .}}
- filter operates on an slice or array of structures.  It allows the caller
  to filter the input array based on the value of a single field.
  The function returns a slice containing only the objects that satisfy the
  filter, e.g.

  ciao-cli image list -f '{{$x := filter . "Protected" "true"}}{{len $x}}'

  outputs the number of protected images maintained by the image service.

The image list command was also modified to called the template utility
functions in template.go.  This was necessary to ensure that our new
functions are available to the image list command.

Finally, a the createTemplate function was using the wrong name for the
templates it created.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>

12000 of 18494 relevant lines covered (64.89%)

0.7 hits per line

Jobs
ID Job ID Ran Files Coverage
2 294.2 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 18 Nov 2016 03:48PM UTC 0
64.89
Travis Job 294.2
Source Files on build 294
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #294
  • 705c40d3 on github
  • Prev Build on master (#294)
  • Next Build on master (#295)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc