compose-go
compose-go copied to clipboard
Reference library for parsing and loading Compose YAML files
The regular expression for octal escape sequences matches too much (`0\d{0,3}` instead of `0[0-7]{0,3}`, although that is still too much), replaces a `\0` prefix with just `\`, and then if...
If the inheritance syntax is used the line number isn't incremented. Meaning, if `rune == '\n'` here, then `p.line` needs to be incremented: https://github.com/compose-spec/compose-go/blob/9d0d133e13d0955e27520c6317d08822b7c5de5f/dotenv/parser.go#L120 I'd add that before the successful...
https://github.com/compose-spec/compose-go/blob/main/cli/options.go#L240 This will call `GetAsEqualsMap` which will throw with an index out of bound in case a string does not contain an equal sign. (we did hit that with a...
Hey, I just noticed that the recursion here could be a simple loop, I think? (I'm new to Go, not new to programming.) https://github.com/compose-spec/compose-go/blob/35c575c758afd2a8363bd47290c3ddec0d23ebaf/dotenv/parser.go#L77-L94 Could be something like this: ```Go...
When docker compose file does not have labels field defined, adding labels does not work, here is the example of the code: ``` package main import ( "context" "fmt" "log"...
when ran from a symlink, while we find compose.yaml we run with a distinct project_dir and project_name. This might be user intent but also can cause unexpected behavior. This PR...
Detect and use the right ResourceLoader to load a config file and add it `ConfigDetails` struct. `LocalResourceLoader` is always used as the last loader and should failed if it's not...
Per https://github.com/compose-spec/compose-spec/blob/master/13-merge.md#unique-resources > Applies to the ports, volumes, secrets and configs services attributes. While these types are modeled in a Compose file as a sequence, they have special uniqueness requirements:...
Introduce a generic mechanism to drop attributes with an empty value. A typical scenario is: attribute is set by an interpolation variable, which resolves to empty string (maybe variable is...
introduce ability to define a service image as a combination of `name`, `tag` and `digest` (aligned with https://github.com/distribution/reference terminology) ```yaml services: test: image: name: registry.com/foo tag: bar digest: sha256:1234... ```...