非常に簡単です。
ファイルをダウンロードさせたり、デバイスによってファイル出し分けたり。
package main import ( "net/http" ) func StaticHandler(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "img.jpg") } func main() { http.HandleFunc("/foo.jpg", StaticHandler) http.ListenAndServe(":15100", nil) }