First thanks for the quick reply, but I still can't figure this out.
When I do the type casting somewhere something goes wrong, and I think it has something to do with pointers.
The error complains about line 70, and I have included line 70 and all it's associates down below.
Type casting to HTML:
u := &uri.Uri{Host: "ctoken.com", Appl: "wiki", Func: "v", Path: "", File: "about.html"}
V.Menu = template.HTML(u.Link("cToken"))
The Error:
2012/09/07 01:09:57 http: panic serving
127.0.0.1:36228: runtime error: assignment to entry in nil map
/usr/local/go/src/pkg/net/http/server.go:576 (0x448416)
/tmp/bindist927634324/go/src/pkg/runtime/proc.c:1443 (0x410688)
/tmp/bindist927634324/go/src/pkg/runtime/runtime.c:128 (0x411154)
/tmp/bindist927634324/go/src/pkg/runtime/hashmap.c:952 (0x406d72)
/home/tamer/code/go/src/gotamer/uri/uri.go:70 (0x41ea1d)
(*Uri).Set: ss.Segs[c] = Segment{&key, &value}
Error pointer code:
Host string // localhost:8080
Appl string // Wiki, Blog
Func string // v,a,u,s view,add,update,save
Path string // Directory / Category
File string // The file name with html extention
Segs map[uint]Segment // segments
func (ss *Uri) Set(key string, value string) { //defer ResSegments.mu.Unlock()
ss.Segs[c] = Segment{&key, &value} // ### Line 70