You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,7 @@ Within those templates, the object emitted by docker-gen will have [this structu
108
108
**`closest $array $value`: Returns the longest matching substring in `$array` that matches `$value`
109
109
**`coalesce ...`*: Returns the first non-nil argument.
110
110
**`contains $map $key`*: Returns `true` if `$map` contains `$key`. Takes maps from `string` to `string`.
111
+
**`dict $key $value ...`*: Creates a map from a list of pairs. Each `$key` value must be a `string`, but the `$value` can be any type (or `nil`). Useful for passing more than one value as a pipeline context to subtemplates.
111
112
**`dir $path`: Returns an array of filenames in the specified `$path`.
112
113
**`exists $path`*: Returns `true` if `$path` refers to an existing file or directory. Takes a string.
113
114
**`first $array`*: Returns the first value of an array or nil if the arry is nil or empty.
@@ -116,12 +117,11 @@ Within those templates, the object emitted by docker-gen will have [this structu
116
117
**`groupByMulti $containers $fieldPath $sep`*: Like `groupBy`, but the string value specified by `$fieldPath` is first split by `$sep` into a list of strings. A container whose `$fieldPath` value contains a list of strings will show up in the map output under each of those strings.
117
118
**`hasPrefix $prefix $string`*: Returns whether `$prefix` is a prefix of `$string`.
118
119
**`hasSuffix $suffix $string`*: Returns whether `$suffix` is a suffix of `$string`.
119
-
**`split $string $sep`*: Splits `$string` into a slice of substrings delimited by `$sep`. Alias for [`strings.Split`](http://golang.org/pkg/strings/#Split)
120
-
**`replace $string $old $new $count`*: Replaces up to `$count` occurences of `$old` with `$new` in `$string`. Alias for [`strings.Replace`](http://golang.org/pkg/strings/#Replace)
121
-
**`dict $key $value ...`*: Creates a map from a list of pairs. Each `$key` value must be a `string`, but the `$value` can be any type (or `nil`). Useful for passing more than one value as a pipeline context to subtemplates.
122
-
**`sha1 $string`*: Returns the hexadecimal representation of the SHA1 hash of `$string`.
123
120
**`json $value`*: Returns the JSON representation of `$value` as a `string`.
124
121
**`last $array`*: Returns the last value of an array.
122
+
**`replace $string $old $new $count`*: Replaces up to `$count` occurences of `$old` with `$new` in `$string`. Alias for [`strings.Replace`](http://golang.org/pkg/strings/#Replace)
123
+
**`sha1 $string`*: Returns the hexadecimal representation of the SHA1 hash of `$string`.
124
+
**`split $string $sep`*: Splits `$string` into a slice of substrings delimited by `$sep`. Alias for [`strings.Split`](http://golang.org/pkg/strings/#Split)
0 commit comments