ComposeFile.AddConfig
Method
type ComposeFile interface { // ... omitted for brevity AddConfig( name string, options ...*AddConfigOptions, ) ComposeFile}Signature
method
AddConfig Adds a top-level config definition to the Docker Compose file.
AddConfig( name string, options ...*AddConfigOptions,) ComposeFileParameters
namestringThe name of the config.options...*AddConfigOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddConfigOptions argument.
File*stringThe path to the config file.Content*stringThe inline config content.External*boolA value indicating whether the config is managed outside the generated Compose file.Configurefunc(obj Config) callbackAn optional callback for further config customization.Returns
ComposeFile The updated Docker Compose file.
Returns a handle; failures surface later via Err().
Defined on
This method is defined on the following type: