summaryrefslogtreecommitdiff
path: root/vendor/github.com/BurntSushi/toml/meta.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2022-07-28 23:27:42 +0200
committerMiloslav Trmač <mitr@redhat.com>2022-08-02 16:52:56 +0200
commiteacee60c83685c9e6796b96b22f51625f8012530 (patch)
tree1f9c202f77addfebdf4e004795c9c33ff3ebd008 /vendor/github.com/BurntSushi/toml/meta.go
parent62cc871c6667268fca30708fd03f25ee66a6fc99 (diff)
downloadpodman-eacee60c83685c9e6796b96b22f51625f8012530.tar.gz
podman-eacee60c83685c9e6796b96b22f51625f8012530.tar.bz2
podman-eacee60c83685c9e6796b96b22f51625f8012530.zip
Update c/common to an unreleased version
... to get https://github.com/containers/common/pull/1106 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'vendor/github.com/BurntSushi/toml/meta.go')
-rw-r--r--vendor/github.com/BurntSushi/toml/meta.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/BurntSushi/toml/meta.go b/vendor/github.com/BurntSushi/toml/meta.go
index 868619fb9..d284f2a0c 100644
--- a/vendor/github.com/BurntSushi/toml/meta.go
+++ b/vendor/github.com/BurntSushi/toml/meta.go
@@ -12,10 +12,11 @@ import (
type MetaData struct {
context Key // Used only during decoding.
+ keyInfo map[string]keyInfo
mapping map[string]interface{}
- types map[string]tomlType
keys []Key
decoded map[string]struct{}
+ data []byte // Input file; for errors.
}
// IsDefined reports if the key exists in the TOML data.
@@ -50,8 +51,8 @@ func (md *MetaData) IsDefined(key ...string) bool {
// Type will return the empty string if given an empty key or a key that does
// not exist. Keys are case sensitive.
func (md *MetaData) Type(key ...string) string {
- if typ, ok := md.types[Key(key).String()]; ok {
- return typ.typeString()
+ if ki, ok := md.keyInfo[Key(key).String()]; ok {
+ return ki.tomlType.typeString()
}
return ""
}