Initializing map
This commit is contained in:
parent
e9f2aed7cb
commit
09b861ddfb
4
file.go
4
file.go
@ -52,6 +52,10 @@ func (f *file) Property(key, def string) interface{} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (f *file) SetProperty(key string, value interface{}) {
|
func (f *file) SetProperty(key string, value interface{}) {
|
||||||
|
if f.meta == nil {
|
||||||
|
f.meta = make(map[string]interface{})
|
||||||
|
}
|
||||||
|
|
||||||
f.meta[key] = value
|
f.meta[key] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user