From 09b861ddfb126a1ec115a3631a75d69a88b5ba8e Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 31 Oct 2015 16:58:50 +0900 Subject: [PATCH] Initializing map --- file.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/file.go b/file.go index 2c401b4..78c9fa2 100644 --- a/file.go +++ b/file.go @@ -52,6 +52,10 @@ func (f *file) Property(key, def string) interface{} { } func (f *file) SetProperty(key string, value interface{}) { + if f.meta == nil { + f.meta = make(map[string]interface{}) + } + f.meta[key] = value }