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

gernest / bearcub / 8 / 1
83%
master: 83%

Build:
Build:
LAST BUILD BRANCH: rewrite
DEFAULT BRANCH: master
Ran 19 Aug 2017 03:46PM UTC
Files 1
Run time 0s
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

19 Aug 2017 03:45PM UTC coverage: 82.5%. First build
8.1

push

travis-ci

gernest
Use text/template to render variable replacement

This is a new implementation of ReplaceString which uses text/template for heavy lifting.

What it does is first the input is rewritten to tags that are going to be identified by text/emplate, then the rewritten template is passed to text/template for rendering.

The special tags are `<<` and `>>` so,  `{host}` becomes `<< replace "host">>` where replace is the template function with signature `func(string)string`

This will work well with json, the fact here is we can later change special tags to be unique to any particular text format that way the function can be used on xml etc.

The replaced variables are handled by the end user meaning not only can json objects be adressed but aslo arbitrary logic can be handled since templating is separaed from replacement

99 of 120 relevant lines covered (82.5%)

12.87 hits per line

Source Files on job 8.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8
  • Travis Job 8.1
  • b880000a on github
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