mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Merge pull request #13776 from containers/dependabot/go_modules/github.com/BurntSushi/toml-1.1.0
build(deps): bump github.com/BurntSushi/toml from 1.0.0 to 1.1.0
This commit is contained in:
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module github.com/containers/podman/v4
|
|||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/BurntSushi/toml v1.0.0
|
github.com/BurntSushi/toml v1.1.0
|
||||||
github.com/blang/semver v3.5.1+incompatible
|
github.com/blang/semver v3.5.1+incompatible
|
||||||
github.com/buger/goterm v1.0.4
|
github.com/buger/goterm v1.0.4
|
||||||
github.com/checkpoint-restore/checkpointctl v0.0.0-20211204171957-54b4ebfdb681
|
github.com/checkpoint-restore/checkpointctl v0.0.0-20211204171957-54b4ebfdb681
|
||||||
|
3
go.sum
3
go.sum
@ -81,8 +81,9 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ
|
|||||||
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU=
|
|
||||||
github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
|
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
||||||
|
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
|
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
|
||||||
|
2
vendor/github.com/BurntSushi/toml/README.md
generated
vendored
2
vendor/github.com/BurntSushi/toml/README.md
generated
vendored
@ -56,7 +56,7 @@ And then decoded with:
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
var conf Config
|
var conf Config
|
||||||
err := toml.Decode(tomlData, &conf)
|
_, err := toml.Decode(tomlData, &conf)
|
||||||
// handle error
|
// handle error
|
||||||
```
|
```
|
||||||
|
|
||||||
|
73
vendor/github.com/BurntSushi/toml/decode.go
generated
vendored
73
vendor/github.com/BurntSushi/toml/decode.go
generated
vendored
@ -1,6 +1,7 @@
|
|||||||
package toml
|
package toml
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"encoding"
|
"encoding"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
@ -18,11 +19,29 @@ type Unmarshaler interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`.
|
// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`.
|
||||||
func Unmarshal(p []byte, v interface{}) error {
|
func Unmarshal(data []byte, v interface{}) error {
|
||||||
_, err := Decode(string(p), v)
|
_, err := NewDecoder(bytes.NewReader(data)).Decode(v)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Decode the TOML data in to the pointer v.
|
||||||
|
//
|
||||||
|
// See the documentation on Decoder for a description of the decoding process.
|
||||||
|
func Decode(data string, v interface{}) (MetaData, error) {
|
||||||
|
return NewDecoder(strings.NewReader(data)).Decode(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// DecodeFile is just like Decode, except it will automatically read the
|
||||||
|
// contents of the file at path and decode it for you.
|
||||||
|
func DecodeFile(path string, v interface{}) (MetaData, error) {
|
||||||
|
fp, err := os.Open(path)
|
||||||
|
if err != nil {
|
||||||
|
return MetaData{}, err
|
||||||
|
}
|
||||||
|
defer fp.Close()
|
||||||
|
return NewDecoder(fp).Decode(v)
|
||||||
|
}
|
||||||
|
|
||||||
// Primitive is a TOML value that hasn't been decoded into a Go value.
|
// Primitive is a TOML value that hasn't been decoded into a Go value.
|
||||||
//
|
//
|
||||||
// This type can be used for any value, which will cause decoding to be delayed.
|
// This type can be used for any value, which will cause decoding to be delayed.
|
||||||
@ -42,27 +61,10 @@ type Primitive struct {
|
|||||||
// The significand precision for float32 and float64 is 24 and 53 bits; this is
|
// The significand precision for float32 and float64 is 24 and 53 bits; this is
|
||||||
// the range a natural number can be stored in a float without loss of data.
|
// the range a natural number can be stored in a float without loss of data.
|
||||||
const (
|
const (
|
||||||
maxSafeFloat32Int = 16777215 // 2^24-1
|
maxSafeFloat32Int = 16777215 // 2^24-1
|
||||||
maxSafeFloat64Int = 9007199254740991 // 2^53-1
|
maxSafeFloat64Int = int64(9007199254740991) // 2^53-1
|
||||||
)
|
)
|
||||||
|
|
||||||
// PrimitiveDecode is just like the other `Decode*` functions, except it
|
|
||||||
// decodes a TOML value that has already been parsed. Valid primitive values
|
|
||||||
// can *only* be obtained from values filled by the decoder functions,
|
|
||||||
// including this method. (i.e., `v` may contain more `Primitive`
|
|
||||||
// values.)
|
|
||||||
//
|
|
||||||
// Meta data for primitive values is included in the meta data returned by
|
|
||||||
// the `Decode*` functions with one exception: keys returned by the Undecoded
|
|
||||||
// method will only reflect keys that were decoded. Namely, any keys hidden
|
|
||||||
// behind a Primitive will be considered undecoded. Executing this method will
|
|
||||||
// update the undecoded keys in the meta data. (See the example.)
|
|
||||||
func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error {
|
|
||||||
md.context = primValue.context
|
|
||||||
defer func() { md.context = nil }()
|
|
||||||
return md.unify(primValue.undecoded, rvalue(v))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Decoder decodes TOML data.
|
// Decoder decodes TOML data.
|
||||||
//
|
//
|
||||||
// TOML tables correspond to Go structs or maps (dealer's choice – they can be
|
// TOML tables correspond to Go structs or maps (dealer's choice – they can be
|
||||||
@ -158,22 +160,21 @@ func (dec *Decoder) Decode(v interface{}) (MetaData, error) {
|
|||||||
return md, md.unify(p.mapping, rv)
|
return md, md.unify(p.mapping, rv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decode the TOML data in to the pointer v.
|
// PrimitiveDecode is just like the other `Decode*` functions, except it
|
||||||
|
// decodes a TOML value that has already been parsed. Valid primitive values
|
||||||
|
// can *only* be obtained from values filled by the decoder functions,
|
||||||
|
// including this method. (i.e., `v` may contain more `Primitive`
|
||||||
|
// values.)
|
||||||
//
|
//
|
||||||
// See the documentation on Decoder for a description of the decoding process.
|
// Meta data for primitive values is included in the meta data returned by
|
||||||
func Decode(data string, v interface{}) (MetaData, error) {
|
// the `Decode*` functions with one exception: keys returned by the Undecoded
|
||||||
return NewDecoder(strings.NewReader(data)).Decode(v)
|
// method will only reflect keys that were decoded. Namely, any keys hidden
|
||||||
}
|
// behind a Primitive will be considered undecoded. Executing this method will
|
||||||
|
// update the undecoded keys in the meta data. (See the example.)
|
||||||
// DecodeFile is just like Decode, except it will automatically read the
|
func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error {
|
||||||
// contents of the file at path and decode it for you.
|
md.context = primValue.context
|
||||||
func DecodeFile(path string, v interface{}) (MetaData, error) {
|
defer func() { md.context = nil }()
|
||||||
fp, err := os.Open(path)
|
return md.unify(primValue.undecoded, rvalue(v))
|
||||||
if err != nil {
|
|
||||||
return MetaData{}, err
|
|
||||||
}
|
|
||||||
defer fp.Close()
|
|
||||||
return NewDecoder(fp).Decode(v)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// unify performs a sort of type unification based on the structure of `rv`,
|
// unify performs a sort of type unification based on the structure of `rv`,
|
||||||
|
6
vendor/github.com/BurntSushi/toml/encode.go
generated
vendored
6
vendor/github.com/BurntSushi/toml/encode.go
generated
vendored
@ -212,7 +212,7 @@ func (enc *Encoder) eElement(rv reflect.Value) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
encPanic(err)
|
encPanic(err)
|
||||||
}
|
}
|
||||||
enc.writeQuoted(string(s))
|
enc.w.Write(s)
|
||||||
return
|
return
|
||||||
case encoding.TextMarshaler:
|
case encoding.TextMarshaler:
|
||||||
s, err := v.MarshalText()
|
s, err := v.MarshalText()
|
||||||
@ -398,6 +398,10 @@ func (enc *Encoder) eStruct(key Key, rv reflect.Value, inline bool) {
|
|||||||
if f.PkgPath != "" && !f.Anonymous { /// Skip unexported fields.
|
if f.PkgPath != "" && !f.Anonymous { /// Skip unexported fields.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
opts := getOptions(f.Tag)
|
||||||
|
if opts.skip {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
frv := rv.Field(i)
|
frv := rv.Field(i)
|
||||||
|
|
||||||
|
2
vendor/github.com/BurntSushi/toml/error.go
generated
vendored
2
vendor/github.com/BurntSushi/toml/error.go
generated
vendored
@ -10,7 +10,7 @@ import (
|
|||||||
// For example invalid syntax, duplicate keys, etc.
|
// For example invalid syntax, duplicate keys, etc.
|
||||||
//
|
//
|
||||||
// In addition to the error message itself, you can also print detailed location
|
// In addition to the error message itself, you can also print detailed location
|
||||||
// information with context by using ErrorWithLocation():
|
// information with context by using ErrorWithPosition():
|
||||||
//
|
//
|
||||||
// toml: error: Key 'fruit' was already created and cannot be used as an array.
|
// toml: error: Key 'fruit' was already created and cannot be used as an array.
|
||||||
//
|
//
|
||||||
|
5
vendor/github.com/BurntSushi/toml/lex.go
generated
vendored
5
vendor/github.com/BurntSushi/toml/lex.go
generated
vendored
@ -128,6 +128,11 @@ func (lx lexer) getPos() Position {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (lx *lexer) emit(typ itemType) {
|
func (lx *lexer) emit(typ itemType) {
|
||||||
|
// Needed for multiline strings ending with an incomplete UTF-8 sequence.
|
||||||
|
if lx.start > lx.pos {
|
||||||
|
lx.error(errLexUTF8{lx.input[lx.pos]})
|
||||||
|
return
|
||||||
|
}
|
||||||
lx.items <- item{typ: typ, pos: lx.getPos(), val: lx.current()}
|
lx.items <- item{typ: typ, pos: lx.getPos(), val: lx.current()}
|
||||||
lx.start = lx.pos
|
lx.start = lx.pos
|
||||||
}
|
}
|
||||||
|
8
vendor/github.com/BurntSushi/toml/parse.go
generated
vendored
8
vendor/github.com/BurntSushi/toml/parse.go
generated
vendored
@ -220,7 +220,7 @@ func (p *parser) value(it item, parentIsArray bool) (interface{}, tomlType) {
|
|||||||
case itemString:
|
case itemString:
|
||||||
return p.replaceEscapes(it, it.val), p.typeOfPrimitive(it)
|
return p.replaceEscapes(it, it.val), p.typeOfPrimitive(it)
|
||||||
case itemMultilineString:
|
case itemMultilineString:
|
||||||
return p.replaceEscapes(it, stripFirstNewline(stripEscapedNewlines(it.val))), p.typeOfPrimitive(it)
|
return p.replaceEscapes(it, stripFirstNewline(p.stripEscapedNewlines(it.val))), p.typeOfPrimitive(it)
|
||||||
case itemRawString:
|
case itemRawString:
|
||||||
return it.val, p.typeOfPrimitive(it)
|
return it.val, p.typeOfPrimitive(it)
|
||||||
case itemRawMultilineString:
|
case itemRawMultilineString:
|
||||||
@ -647,7 +647,7 @@ func stripFirstNewline(s string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove newlines inside triple-quoted strings if a line ends with "\".
|
// Remove newlines inside triple-quoted strings if a line ends with "\".
|
||||||
func stripEscapedNewlines(s string) string {
|
func (p *parser) stripEscapedNewlines(s string) string {
|
||||||
split := strings.Split(s, "\n")
|
split := strings.Split(s, "\n")
|
||||||
if len(split) < 1 {
|
if len(split) < 1 {
|
||||||
return s
|
return s
|
||||||
@ -679,6 +679,10 @@ func stripEscapedNewlines(s string) string {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if i == len(split)-1 {
|
||||||
|
p.panicf("invalid escape: '\\ '")
|
||||||
|
}
|
||||||
|
|
||||||
split[i] = line[:len(line)-1] // Remove \
|
split[i] = line[:len(line)-1] // Remove \
|
||||||
if len(split)-1 > i {
|
if len(split)-1 > i {
|
||||||
split[i+1] = strings.TrimLeft(split[i+1], " \t\r")
|
split[i+1] = strings.TrimLeft(split[i+1], " \t\r")
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -1,7 +1,7 @@
|
|||||||
# github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1
|
# github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1
|
||||||
github.com/Azure/go-ansiterm
|
github.com/Azure/go-ansiterm
|
||||||
github.com/Azure/go-ansiterm/winterm
|
github.com/Azure/go-ansiterm/winterm
|
||||||
# github.com/BurntSushi/toml v1.0.0
|
# github.com/BurntSushi/toml v1.1.0
|
||||||
## explicit
|
## explicit
|
||||||
github.com/BurntSushi/toml
|
github.com/BurntSushi/toml
|
||||||
github.com/BurntSushi/toml/internal
|
github.com/BurntSushi/toml/internal
|
||||||
|
Reference in New Issue
Block a user