I have the following TOML:

[system] username = "username" password = "password" [engine.dir] engineName = "engine1" [engine.doc] engineName = "engine2"

For this TOML properties, I have the following struct (I don't know if it matches the properties file):

type ( Data struct { System system Engines map[string]engine } system struct { Username string Password string } engine struct { Dir struct { EngineName string } Doc struct { EngineName string }

I have the following GO source to decode the properties file:

var cfgData Data if _, err := toml.DecodeFile("data.toml", &cfgData); err != nil { log.Fatal(err) }

The burntsushi/toml library doesn't trigger any errors. I'm having difficulty decoding the EngineName fields. How can I access them?

Thesevs SCUTULATUS's user avatar

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.