sweet: error on unknown fields in config toml

It took me two days to notice that my `buildenv` field was a typo
(should be `envbuild`), and was thus silently ignored.

Make this an immediate error instead.

Change-Id: Iea72d8874404c9ccc6f6c7518417fb06d4e7c1bf
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/446015
Auto-Submit: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
diff --git a/sweet/cmd/sweet/run.go b/sweet/cmd/sweet/run.go
index 75f75aa..04ce9ed 100644
--- a/sweet/cmd/sweet/run.go
+++ b/sweet/cmd/sweet/run.go
@@ -242,9 +242,13 @@
 			return fmt.Errorf("failed to read %q: %v", configFile, err)
 		}
 		var fconfigs common.ConfigFile
-		if err := toml.Unmarshal(b, &fconfigs); err != nil {
+		md, err := toml.Decode(string(b), &fconfigs)
+		if err != nil {
 			return fmt.Errorf("failed to parse %q: %v", configFile, err)
 		}
+		if len(md.Undecoded()) != 0 {
+			return fmt.Errorf("unexpected keys in %q: %+v", configFile, md.Undecoded())
+		}
 		// Validate each config and append to central list.
 		for _, config := range fconfigs.Configs {
 			if config.Name == "" {