Created
September 11, 2014 17:37
-
-
Save rafrombrc/0bf3dc491169c6887394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value = "overwrite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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