Files

26 lines
419 B
Go

package main
type FileWithOptions struct {
Options map[string]string
io.Reader
}
func mapToStruct[T any](m map[string]string, a T) T {
t := reflect.TypeOf(a)
for _, v := range reflect.VisibleFields(t) {
v.
}
}
func Handle(img image.Image) http.Handler {
func(w http.ResponseWriter,
r *http.Request) {
err := png.Encode(w, img)
if err != nil {
log.Fatal(err)
w.WriteHeader(500)
return
}
}
}