mirror of
https://github.com/restic/restic.git
synced 2025-12-08 06:09:56 +00:00
Update vendored library github.com/go-ini/ini
This commit is contained in:
parent
0d01c27c9e
commit
874b3dbbd9
11 changed files with 175 additions and 103 deletions
10
vendor/github.com/go-ini/ini/struct_test.go
generated
vendored
10
vendor/github.com/go-ini/ini/struct_test.go
generated
vendored
|
|
@ -37,7 +37,7 @@ type testNested struct {
|
|||
Unused int `ini:"-"`
|
||||
}
|
||||
|
||||
type testEmbeded struct {
|
||||
type TestEmbeded struct {
|
||||
GPA float64
|
||||
}
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ type testStruct struct {
|
|||
Born time.Time
|
||||
Time time.Duration `ini:"Duration"`
|
||||
Others testNested
|
||||
*testEmbeded `ini:"grade"`
|
||||
*TestEmbeded `ini:"grade"`
|
||||
Unused int `ini:"-"`
|
||||
Unsigned uint
|
||||
Omitted bool `ini:"omitthis,omitempty"`
|
||||
|
|
@ -97,12 +97,12 @@ type unsupport2 struct {
|
|||
}
|
||||
}
|
||||
|
||||
type unsupport3 struct {
|
||||
type Unsupport3 struct {
|
||||
Cities byte
|
||||
}
|
||||
|
||||
type unsupport4 struct {
|
||||
*unsupport3 `ini:"Others"`
|
||||
*Unsupport3 `ini:"Others"`
|
||||
}
|
||||
|
||||
type defaultValue struct {
|
||||
|
|
@ -155,7 +155,7 @@ func Test_MapToStruct(t *testing.T) {
|
|||
So(fmt.Sprint(ts.Others.Populations), ShouldEqual, "[12345678 98765432]")
|
||||
So(fmt.Sprint(ts.Others.Coordinates), ShouldEqual, "[192.168 10.11]")
|
||||
So(ts.Others.Note, ShouldEqual, "Hello world!")
|
||||
So(ts.testEmbeded.GPA, ShouldEqual, 2.8)
|
||||
So(ts.TestEmbeded.GPA, ShouldEqual, 2.8)
|
||||
})
|
||||
|
||||
Convey("Map section to struct", func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue