摘要: 一、最简单一个index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>this is my first Html</title> </head> <body> 这是index页面!!!! </body> </h 阅读全文
posted @ 2021-06-23 15:51 南昌拌粉的成长 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 一、handle案例 1、main.go如下,http访问:127.0.0.1:9990/static/mytest.txt package main import ( "net/http" ) func main(){ addr :=":9990" //www目录和main文件在同一级,查找www 阅读全文
posted @ 2021-06-23 01:27 南昌拌粉的成长 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 一、template嵌套 package main import ( "os" "text/template" ) type title struct { Title string } func main(){ header :=`{{ define "header"}}<head><meta ch 阅读全文
posted @ 2021-06-23 00:58 南昌拌粉的成长 阅读(387) 评论(0) 推荐(0) 编辑