June 2017
Intermediate to advanced
400 pages
10h 32m
English
These steps cover writing and running your application:
package confformat import ( "bytes" "github.com/BurntSushi/toml" ) // TOMLData is our common data struct // with TOML struct tags type TOMLData struct { Name string `toml:"name"` Age int `toml:"age"` } // ToTOML dumps the TOMLData struct to // a TOML format bytes.Buffer func (t *TOMLData) ToTOML() (*bytes.Buffer, error) { b := &bytes.Buffer{}