go-mega-code icon indicating copy to clipboard operation
go-mega-code copied to clipboard

Go-Mega Tutorial code

Results 1 go-mega-code issues
Sort by recently updated
recently updated
newest added

我在运行第三章demo时,总是空白页面,调试时候发现把这一行 https://github.com/bonfy/go-mega-code/blob/e5fd3ef25bcc6874818621d06e68dee3d379778a/main.go#L54 改成 tmpl.ParseFiles("/path/to/index.html") 之后就能正常显示页面,我读了下 Parse 和 ParseFiles函数源码,按照 ParseFiles 的写法把这一行改成下面这样,也可以正常显示 ```go _, err = tmpl.New(fi.Name()).Parse(string(content)) ```