Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitutions in array fail #34

Closed
sholsapp opened this issue Dec 20, 2022 · 0 comments
Closed

Substitutions in array fail #34

sholsapp opened this issue Dec 20, 2022 · 0 comments

Comments

@sholsapp
Copy link

I see an error on lines like this, that contain substitutions. I tried the suggested workaround here, but then the substitutions don't expand as they're interpreted as raw strings.

test.conf

x.y = "foo"
a.b = "baz"

arr = [
          ${x.y}"."${a.b}
]

tool

package main
import (
        "fmt"
        "log"
        "os"
        "github.com/gurkankaymak/hocon"
)
func main() {
        conf, err := hocon.ParseResource(os.Getenv("CONF"))
        if err != nil {
                log.Fatal("error while parsing configuration: ", err)
        }
        fmt.Println(conf)
}

output

2022/12/19 18:46:17 error while parsing configuration: missing comma! at: 5:17, values should have comma or ASCII newline ('\n') between them

Per https://hocon-playground.avelier.dev/ this should work.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant