Tianon Gravi
143301cc9e
Merge github.com/docker-library/go-dockerlibrary into bashbrew
...
This adjusts import paths, go.mod, and adds a new "Dockerfile.test" to run the unit tests.
2020-08-19 16:21:07 -07:00
Tianon Gravi
8e25067487
Update Go versions to 1.12 and 1.13
...
See https://golang.org/doc/go1.12#text/template , especially:
> If a user-defined function called by a template panics, the panic is now caught and returned as an error by the `Execute` or `ExecuteTemplate` method.
2019-12-10 16:36:34 -08:00
Tianon Gravi
57f0420223
Add new "getenv" templatelib function
...
Three usages:
- getenv "FOO"
- getenv "FOO" "default"
- getenv "FOO" "set" "unset"
2017-07-12 16:06:44 -07:00
Tianon Gravi
818247f8b4
Add examples/tests for "pkg/execpipe" (100% coverage!)
2017-04-03 15:02:26 -07:00
Tianon Gravi
b7dd34a9b2
Update coverage in "pkg/templatelib" to 100%
2017-04-03 12:57:27 -07:00
Tianon Gravi
3da366f1ac
Rename example functions so they actually show up
2017-04-03 12:29:03 -07:00
Tianon Gravi
fa89a44b4d
Rename example functions so they show up in godoc properly
2017-04-03 12:25:50 -07:00
Tianon Gravi
8177bb8839
Add some examples/tests for "pkg/templatelib" (94.9% coverage)
2017-04-03 12:20:49 -07:00
Tianon Gravi
273a3770eb
Update "pkg/stripper" coverage to 100% with a smaller buffer size
2017-04-03 11:19:48 -07:00
Tianon Gravi
8e09786a2f
Add an example of our CommentStripper that doubles as a test
2017-04-01 08:10:49 -07:00
Tianon Gravi
2406f9a744
Add some godocs for templatelib (mostly so I don't forget again how to use it, but also for others)
2017-02-20 11:07:45 -08:00
Tianon Gravi
945a488370
Rename "execpipe.New" to "execpipe.Run" so it's more clear that it invokes "Start" too
2016-06-24 17:31:43 -07:00
Tianon Gravi
449c8e950c
Add new "execpipe" package for easily streaming the output of commands in a sane, simple "io.Reader" way
2016-06-24 17:09:19 -07:00
Tianon Gravi
c98d0c2b3d
Stop being a dummy reinventing the wheel and use template.IsTrue
2016-06-03 09:15:36 -07:00
Tianon Gravi
3db02d3b23
Add "empty string is false" to "ternary"
2016-06-02 20:41:21 -07:00
Tianon Gravi
5e6bbb37cb
Make ternary more forgiving of "interesting" boolean-like values
2016-06-02 17:30:32 -07:00
Tianon Gravi
29dc82bbab
More reflection tweaking
2016-06-02 17:23:48 -07:00
Tianon Gravi
032bdbe949
Use proper reflection instead of simple type switching
2016-06-02 17:21:11 -07:00
Tianon Gravi
5c8be71405
Generify some of the "action factory" logic in templatelib, thus allowing "first" and "last" to work on arbitrary types instead of just strings
2016-06-02 17:14:33 -07:00
Tianon Gravi
e4fd05106a
Screw it, let functions take only one argument instead of requiring two
2016-06-02 17:05:15 -07:00
Tianon Gravi
e55c34e8a6
Add new "ternary" templatelib function
2016-06-02 17:01:09 -07:00
Tianon Gravi
939e8fc63d
Fix minor typo
2016-06-02 16:49:58 -07:00
Tianon Gravi
369f346d90
Add a new "pkg/templatelib" package with the start of a simple text/template "stdlib"
2016-06-02 16:46:29 -07:00
Tianon Gravi
c09c7f0323
Rename misc -> pkg ( https://twitter.com/davecheney/status/733156157192175616 )
2016-05-25 15:49:51 -07:00