mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-03 07:06:30 +00:00
34 lines
722 B
Text
34 lines
722 B
Text
|
Go package emulates bash environment variable substitution in a string using ${var} syntax. Includes support for bash string replacement functions.
|
||
|
|
||
|
Documentation:
|
||
|
|
||
|
http://godoc.org/github.com/drone/env
|
||
|
|
||
|
Supported Functions:
|
||
|
|
||
|
${var^}
|
||
|
${var^^}
|
||
|
${var,}
|
||
|
${var,,}
|
||
|
${var:position}
|
||
|
${var:position:length}
|
||
|
${var#substring}
|
||
|
${var##substring}
|
||
|
${var%substring}
|
||
|
${var%%substring}
|
||
|
${var/substring/replacement}
|
||
|
${var//substring/replacement}
|
||
|
${var/#substring/replacement}
|
||
|
${var/%substring/replacement}
|
||
|
${#var}
|
||
|
${var=default}
|
||
|
${var:=default}
|
||
|
${var:-default}
|
||
|
|
||
|
Unsupported Functions:
|
||
|
|
||
|
${var-default}
|
||
|
${var+default}
|
||
|
${var:?default}
|
||
|
${var:+default}
|