3

golang 模板 定义问题,求大神指点

 3 years ago
source link: https://www.v2ex.com/t/788790
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Go

golang 模板 定义问题,求大神指点

  alfredhuo · 6 小时 23 分钟前 · 260 次点击
golang 模板引擎使用的时候,是需要定义模板的,有的后缀是.tmpl,有的后缀是.html,为什么这样定义?有什么区别吗
6 条回复    2021-07-11 08:01:33 +08:00

youngxhui

youngxhui   6 小时 7 分钟前 via Android

catror

catror   6 小时 6 分钟前 via Android

你不要后缀都行

alfredhuo

alfredhuo   5 小时 43 分钟前

我打算用 gin 学习开发一个博客, 但是我目前有个困扰,就是前端的 html 页面的该怎么去写,完全没有思路

wangsongyan

wangsongyan   2 小时 44 分钟前 via iPhone

@alfredhuo #4 static 就是静态资源目录 js/css/图片,views 就是用来放 go 模板的,至于 html 怎么写你可以看下 html 基础或者找些 demo 看下

yanzhiling2001

yanzhiling2001   52 分钟前

没区别,后缀名的问题,

我都爱改成.php 诓甲方

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK