Documentation
¶
Index ¶
Constants ¶
const ( EnvFileHeader = "# This file is automatically created and updated by the distillery; DO NOT EDIT.\n\n" EnvEqualChar = '=' // assignment EnvReplaceChar = '#' // replacement for invalid characters EnvEscapeChar = '\\' // escaping EnvQuoteChar = '"' // quoting )
Variables ¶
This section is empty.
Functions ¶
func EscapeEnvValue ¶
Escape escapes the given value to be written to an environment variable. If the value does not need escaping, it may return it unchanged.
EscapeEnvValue allows ASCII characters from ' ' to '~' (inclusive) as well as '\t', '\r', '\n'. Other characters are automatically replaced by EnvReplaceChar.
func WriteEnvFile ¶
WriteEnvFile writes a .env file to io.Writer. Variables are written in consistent order.
Variable names may only contain ascii letters, numbers or the character "_". Invalid variable names are an error.
Variables values are escaped using EscapeEnvValue.
count contains the number of bytes written to writer. In case of an error, partial content may already have been written to writer, as indicated by count.
Types ¶
type Project ¶
ComposeProject represents a compose project
func Open ¶
Open loads a docker compose project from the given path. The returned name indicates the name, as would be found by the 'docker compose' executable. If the project could not be found, an appropriate error is returned.
NOTE: This intentionally omits using any kind of api for docker compose. This saves a *a lot* of dependencies.