diff options
| author | Martin Atkins <matkins@saymedia.com> | 2018-08-25 16:36:05 -0700 |
|---|---|---|
| committer | Martin Atkins <matkins@saymedia.com> | 2018-08-25 16:36:05 -0700 |
| commit | c6f6feed76e0101fed44c3b98c40170442de7996 (patch) | |
| tree | b15a8889a2f7a25feb31b2f448da870c782172cd /guide/go.rst | |
| parent | d754d5a269203eb514a6172918ed6e5cce1c8fd5 (diff) | |
guide: Start of HCL usage guide
This is guide-style documentation to introduce the different parts of HCL,
as a complement to the reference documentation provided in godoc.
Diffstat (limited to 'guide/go.rst')
| -rw-r--r-- | guide/go.rst | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/guide/go.rst b/guide/go.rst new file mode 100644 index 0000000..bb99d86 --- /dev/null +++ b/guide/go.rst @@ -0,0 +1,27 @@ +Using HCL in a Go application +============================= + +HCL is itself written in Go_ and currently it is primarily intended for use as +a library within other Go programs. + +This section describes a number of different ways HCL can be used to define +and process a configuration language within a Go program. For simple situations, +HCL can decode directly into Go ``struct`` values in a similar way as encoding +packages such as ``encoding/json`` and ``encoding/xml``. + +The HCL Go API also offers some alternative approaches however, for processing +languages that may be more complex or that include portions whose expected +structure cannot be determined until runtime. + +The following sections give an overview of different ways HCL can be used in +a Go program. + +.. toctree:: + :maxdepth: 1 + :caption: Sub-sections: + + go_parsing + go_diagnostics + go_decoding_gohcl + +.. _Go: https://golang.org/ |
