Skip to content

Commit 6e20ca2

Browse files
committed
Fixed receiver Map type to pointer type *Map on each method
1 parent f03152d commit 6e20ca2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

objects.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ import (
3535

3636
// GetBoolean returns true if the map contains the specified key and the value
3737
// equals to the string "true", in any other case returns false.
38-
func (m Map) GetBoolean(key string) bool {
38+
func (m *Map) GetBoolean(key string) bool {
3939
value, ok := m.GetOk(key)
4040
return ok && value == "true"
4141
}
4242

4343
// SetBoolean sets the specified key to the string "true" or "false" if the value
4444
// is respectively true or false.
45-
func (m Map) SetBoolean(key string, value bool) {
45+
func (m *Map) SetBoolean(key string, value bool) {
4646
if value {
4747
m.Set(key, "true")
4848
} else {
@@ -52,7 +52,7 @@ func (m Map) SetBoolean(key string, value bool) {
5252

5353
// GetPath returns a paths.Path object using the map value as path. The function
5454
// returns nil if the key is not present.
55-
func (m Map) GetPath(key string) *paths.Path {
55+
func (m *Map) GetPath(key string) *paths.Path {
5656
value, ok := m.GetOk(key)
5757
if !ok {
5858
return nil
@@ -61,7 +61,7 @@ func (m Map) GetPath(key string) *paths.Path {
6161
}
6262

6363
// SetPath saves the paths.Path object in the map using the path as value of the map
64-
func (m Map) SetPath(key string, value *paths.Path) {
64+
func (m *Map) SetPath(key string, value *paths.Path) {
6565
if value == nil {
6666
m.Set(key, "")
6767
} else {

properties.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ func (m *Map) Keys() []string {
361361

362362
// Values returns an array of the values contained in the Map. Duplicated
363363
// values are repeated in the list accordingly.
364-
func (m Map) Values() []string {
364+
func (m *Map) Values() []string {
365365
values := make([]string, len(m.o))
366366
for i, key := range m.o {
367367
values[i] = m.kv[key]

0 commit comments

Comments
 (0)