跳至主要内容

博文

目前显示的是标签为“dir”的博文

go fileserver

package main import ( "fmt" "net/http" ) func main() { http.Handle("/s/", http.StripPrefix("/s/",     http.FileServer(http.Dir("/home/steven/Downloads")))) err := http.ListenAndServe(":8090", nil) if err != nil { fmt.Println(err) } }