Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 236 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 236 Bytes

Usage

var doc=`
	age = 17
`

type Config struct {
	Age int
}

var config Config
toml.Unmarshal(doc, &config)

Generic Decode

var config interface{}  // or map[string]interface{}
toml.Unmarshal(doc, &config)