summaryrefslogtreecommitdiff
path: root/vendor/github.com/BurntSushi/toml/decode_go116.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-08-05 12:20:26 +0000
committerGitHub <noreply@github.com>2021-08-05 12:20:26 +0000
commitadee0ca59972a8590f5f278a4fbcc531acec2ebb (patch)
tree56e801d9d0c10ffe05ddb9d9c6394aed896f8227 /vendor/github.com/BurntSushi/toml/decode_go116.go
parent117583c293713f2baa920c4035e820ad59fe6622 (diff)
downloadpodman-adee0ca59972a8590f5f278a4fbcc531acec2ebb.tar.gz
podman-adee0ca59972a8590f5f278a4fbcc531acec2ebb.tar.bz2
podman-adee0ca59972a8590f5f278a4fbcc531acec2ebb.zip
Bump github.com/BurntSushi/toml from 0.3.1 to 0.4.1
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 0.3.1 to 0.4.1. - [Release notes](https://github.com/BurntSushi/toml/releases) - [Commits](https://github.com/BurntSushi/toml/compare/v0.3.1...v0.4.1) --- updated-dependencies: - dependency-name: github.com/BurntSushi/toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/BurntSushi/toml/decode_go116.go')
-rw-r--r--vendor/github.com/BurntSushi/toml/decode_go116.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/BurntSushi/toml/decode_go116.go b/vendor/github.com/BurntSushi/toml/decode_go116.go
new file mode 100644
index 000000000..38aa75fdc
--- /dev/null
+++ b/vendor/github.com/BurntSushi/toml/decode_go116.go
@@ -0,0 +1,18 @@
+// +build go1.16
+
+package toml
+
+import (
+ "io/fs"
+)
+
+// DecodeFS is just like Decode, except it will automatically read the contents
+// of the file at `path` from a fs.FS instance.
+func DecodeFS(fsys fs.FS, path string, v interface{}) (MetaData, error) {
+ fp, err := fsys.Open(path)
+ if err != nil {
+ return MetaData{}, err
+ }
+ defer fp.Close()
+ return NewDecoder(fp).Decode(v)
+}