我们可以通过定义模板名称{{define "home"}},然后通过其他(父)模板加载它{{template "home"}}.
我如何通过变量值加载模板{{template .TemplateName}}.或者这不可能?
据我所知,我可以使用Golang运行简单的Web服务器,就像使用http包一样
http.ListenAndServe(PORT, nil)
Run Code Online (Sandbox Code Playgroud)
其中PORT是要侦听的TCP地址.
我可以将PORT用作PORT S,例如http.ListenAndServe(":80, :8080", nil)来自一个应用程序吗?
可能我的问题是愚蠢的,但"谁不问,他不会得到答案!"
谢谢你提前!