repro-run/gitea-ci/static.go
2023-01-23 11:34:54 -03:00

13 lines
222 B
Go

package main
import "net/http"
type staticRoute struct {
file []byte
mime string
}
func (s staticRoute) ServeHTTP(w http.ResponseWriter, req *http.Request) {
w.Header().Add("Content-Type", s.mime)
w.Write(s.file)
}