naoina / toml

TOML parser and encoder library for Golang
MIT License
294 stars 50 forks source link

How modifying a key? #42

Closed samiwt closed 6 years ago

samiwt commented 6 years ago

Does the library incorporate the possibility of modifying a key? Eg: [server] addr = "127.0.0.1" port = 8080 Update server set addr = ":: 1" Update server set port = 3000

Given

[server] addr = "::1" port = 3000

fjl commented 6 years ago

You can do this by parsing the config, updating the Go value and then serializing it out again.