equal
deleted
inserted
replaced
1 package toml |
|
2 |
|
3 // PubTOMLValue wrapping tomlValue in order to access all properties from outside. |
|
4 type PubTOMLValue = tomlValue |
|
5 |
|
6 func (ptv *PubTOMLValue) Value() interface{} { |
|
7 return ptv.value |
|
8 } |
|
9 func (ptv *PubTOMLValue) Comment() string { |
|
10 return ptv.comment |
|
11 } |
|
12 func (ptv *PubTOMLValue) Commented() bool { |
|
13 return ptv.commented |
|
14 } |
|
15 func (ptv *PubTOMLValue) Multiline() bool { |
|
16 return ptv.multiline |
|
17 } |
|
18 func (ptv *PubTOMLValue) Position() Position { |
|
19 return ptv.position |
|
20 } |
|
21 |
|
22 func (ptv *PubTOMLValue) SetValue(v interface{}) { |
|
23 ptv.value = v |
|
24 } |
|
25 func (ptv *PubTOMLValue) SetComment(s string) { |
|
26 ptv.comment = s |
|
27 } |
|
28 func (ptv *PubTOMLValue) SetCommented(c bool) { |
|
29 ptv.commented = c |
|
30 } |
|
31 func (ptv *PubTOMLValue) SetMultiline(m bool) { |
|
32 ptv.multiline = m |
|
33 } |
|
34 func (ptv *PubTOMLValue) SetPosition(p Position) { |
|
35 ptv.position = p |
|
36 } |
|
37 |
|
38 // PubTree wrapping Tree in order to access all properties from outside. |
|
39 type PubTree = Tree |
|
40 |
|
41 func (pt *PubTree) Values() map[string]interface{} { |
|
42 return pt.values |
|
43 } |
|
44 |
|
45 func (pt *PubTree) Comment() string { |
|
46 return pt.comment |
|
47 } |
|
48 |
|
49 func (pt *PubTree) Commented() bool { |
|
50 return pt.commented |
|
51 } |
|
52 |
|
53 func (pt *PubTree) Inline() bool { |
|
54 return pt.inline |
|
55 } |
|
56 |
|
57 func (pt *PubTree) SetValues(v map[string]interface{}) { |
|
58 pt.values = v |
|
59 } |
|
60 |
|
61 func (pt *PubTree) SetComment(c string) { |
|
62 pt.comment = c |
|
63 } |
|
64 |
|
65 func (pt *PubTree) SetCommented(c bool) { |
|
66 pt.commented = c |
|
67 } |
|
68 |
|
69 func (pt *PubTree) SetInline(i bool) { |
|
70 pt.inline = i |
|
71 } |
|