Skip to content

Instantly share code, notes, and snippets.

@rafrombrc
Created September 11, 2014 17:37
Show Gist options
  • Save rafrombrc/0bf3dc491169c6887394 to your computer and use it in GitHub Desktop.
Save rafrombrc/0bf3dc491169c6887394 to your computer and use it in GitHub Desktop.
value = "overwrite"
package main
import (
"github.com/bbangert/toml"
"fmt"
)
type Config struct {
Value string
OtherValue string
}
func main() {
c := &Config{Value: "default", OtherValue: "default2"}
toml.DecodeFile("input.toml", c)
fmt.Printf("c: %+v\n", c)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment