在此workflow中,GitHub与Travis CI之间进行交互,持续集成;Docker Hub链接GitHub项目进行镜像管理。
initRouters() 函数如下:
router.go
LoginHandler
UploadHandler
NotFoundHandler
界面相关配置
测试使用,比较简陋。
layout.gtpl
login.gtpl和upload.gtpl共用该文件,其中当该模板传入的参数为true时,{{template “login”}}会将login.gtpl include到此处;当该模板传入的参数为false时,{{template “upload”}}会将upload.gtpl include到此处;
login.gtpl
{{define "login"}} form action="/login" method="post"> 用户名:input type="text" name="username" /> 密码:input type="password" name="
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!