- From your Terminal or console application,createa new directory called~/projects...
There are many configuration formats that Go, with the use of third-party libraries, supports. Three of the most popular data formats are TOML, YAML, and JSON. Go can support JSON out of the box, and the others have clues on how to marshal/unmarshal or encode/decode data for these formats. These formats have many benefits beyond configuration, but this chapter will largely focus on converting a Go structure in the form of a configuration structure. This recipe will explore basic input and output using these formats.
These formats also provide an interface by which Go and applications written in other languages can share the same configuration. There are also a number of tools that deal with these formats and simplify working with them.
How to do it...
These steps cover writing and running your application: