Back to godoc.org
gomodules.xyz/envsubst

Module gomodules.xyz/envsubst

v0.1.0
Latest Go to latest
Published: Aug 5, 2019 | License: MIT

Source Code

README

envsubst

envsubst is a Go package for expanding variables in a string using ${var} syntax. Includes support for bash string replacement functions.

Documentation

Documentation can be found on GoDoc.

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}
Source: gomodules.xyz/envsubst@v0.1.0/readme.md