improve resource feature in ghttp.Server

This commit is contained in:
john
2019-09-01 22:22:08 +08:00
parent af81bf2bde
commit 7e9fe8ea98
2 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@ import (
func main() {
// 创建一个默认的gmap对象
// 默认情况下该gmap对象支持并发安全特性
// 初始化时可以给定false参数关闭并发安全特性当做一个普通的map使用。
// 默认情况下该gmap对象支持并发安全特性,
// 初始化时可以给定true参数关闭并发安全特性当做一个普通的map使用。
m := gmap.New()
// 设置键值对

View File

@ -284,7 +284,7 @@ func (s *Server) listDir(r *Request, f http.File) {
}
r.Response.Write(`<tr>`)
r.Response.Writef(`<td><a href="%s/%s">%s</a></td>`, r.URL.Path, name, ghtml.SpecialChars(name))
r.Response.Writef(`<td>%s</td>`, gtime.New(file.ModTime()).ISO8601())
r.Response.Writef(`<td style="width:300px;text-align:center;">%s</td>`, gtime.New(file.ModTime()).ISO8601())
r.Response.Writef(`<td style="width:80px;text-align:center;">%s</td>`, size)
r.Response.Write(`</tr>`)
}