-
Notifications
You must be signed in to change notification settings - Fork 6
/
test.go
58 lines (54 loc) · 1.24 KB
/
test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package ini
type testDataSectionName struct {
PropKeyString string
PropKeyInt int
PropKeyUint uint
PropKeyBool bool
PropKeyFloat float64
PropKeySlice []string
PropKeyMap map[string]string
}
type testDataSectionSlice struct {
PropKeyString string
}
type testDataStruct struct {
GlobalKey string
SectionName testDataSectionName
SectionName2 testDataSectionName
SectionSlice1 []testDataSectionSlice
}
var want testDataStruct = testDataStruct{
GlobalKey: "GlobalValue",
SectionName: testDataSectionName{
PropKeyString: "PropValString",
PropKeyInt: -1,
PropKeyUint: 1,
PropKeyBool: true,
PropKeyFloat: 1.2,
PropKeySlice: []string{"PropValSlice1", "PropValSlice2"},
PropKeyMap: map[string]string{
"MapKey1": "PropValMap1",
"MapKey2": "PropValMap2",
},
},
SectionName2: testDataSectionName{
PropKeyString: "PropValString",
PropKeyInt: -1,
PropKeyUint: 1,
PropKeyBool: true,
PropKeyFloat: 1.2,
PropKeySlice: []string{"PropValSlice1", "PropValSlice2"},
PropKeyMap: map[string]string{
"MapKey1": "PropValMap1",
"MapKey2": "PropValMap2",
},
},
SectionSlice1: []testDataSectionSlice{
{
PropKeyString: "PropValString",
},
{
PropKeyString: "PropValString",
},
},
}