> ## Content Index
> Fetch the complete content index at: https://logbuch-changelog.nichedthemes.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# A TOML decoder can list the keys it ignored
- URL: https://logbuch-changelog.nichedthemes.com/burntsushi-toml-lists-the-keys-it-ignored/
- Published: 2026-10-29T15:20:00.000Z
- Updated: 2026-10-29T15:20:00.000Z
- Author: Hanne Voss
- Tags: Pegel, Go, #til, #Import 2026-11-19 07:37

`toml.DecodeFile` from BurntSushi/toml returns a `MetaData`, and its `Undecoded()` lists every key in the file that matched no field. Pegel 0.9.0 uses it to refuse a typo such as `intervall` instead of ignoring it.

```go
md, err := toml.DecodeFile(path, &cfg)
if err != nil {
	return nil, err
}
if keys := md.Undecoded(); len(keys) > 0 {
	return nil, fmt.Errorf("%s: unknown key %q", path, keys[0].String())
}
```

Before, a misspelt key fell back to its default without a word, and nobody suspects a default.