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

01org / ciao / 296 / 1
66%
master: 66%

Build:
DEFAULT BRANCH: master
Ran 21 Nov 2016 03:18PM UTC
Files 89
Run time 6s
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

21 Nov 2016 03:10PM UTC coverage: 64.903% (+10.6%) from 54.343%
COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7

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.
- select operates on a slice of structs.  It outputs the value of a specified
  field for each struct on a new line , e.g.,
  {{select . "Name"}}

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.

The help documentation for commands that accept templates has been updated
to provide a descriptions for the new functions.

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>

12018 of 18517 relevant lines covered (64.9%)

0.7 hits per line

Source Files on job 296.1 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7)
  • Tree
  • List 0
  • Changed 32
  • Source Changed 32
  • Coverage Changed 29
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 296
  • Travis Job 296.1
  • 6c254bcb on github
  • Prev Job for COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7 on master (#295.2)
  • Next Job for COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7 on master (#297.1)
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