HttpHandler

作为 HTTP 响应。

例子

package main

import (
    "awesomeProject/imgo"
    "net/http"
)

func main() {
    http.HandleFunc("/gopher", imgo.Load("gopher.png").HttpHandler)
    http.ListenAndServe(":8080", nil)
}

最后更新于