Initializing map

This commit is contained in:
Alex Yatskov 2015-10-31 16:58:50 +09:00
parent e9f2aed7cb
commit 09b861ddfb

View File

@ -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
} }