Doc: clarify errors returned by Decode (#713)

Fixes #625
This commit is contained in:
Thomas Pelletier
2021-12-26 20:04:09 +01:00
committed by GitHub
parent 535fc65c5f
commit d58eb50ebf
3 changed files with 14 additions and 8 deletions
+5
View File
@@ -73,6 +73,11 @@ func (d *Decoder) SetStrict(strict bool) *Decoder {
// bounds for the target type (which includes negative numbers when decoding
// into an unsigned int).
//
// If an error occurs while decoding the content of the document, this function
// returns a toml.DecodeError, providing context about the issue. When using
// strict mode and a field is missing, a `toml.StrictMissingError` is
// returned. In any other case, this function returns a standard Go error.
//
// Type mapping
//
// List of supported TOML types and their associated accepted Go types: