package types import ( "io" "net/http" ) type option struct { Text string Arc string } type arc struct { Title string Story []string Options []option } type Story map[string]arc func (s Story) ServeHTTP(w http.ResponseWriter, r *http.Request) { arc := r.PathValue("arc") title := s[arc].Title w.Header().Set("Content-Type", "text/plain") io.WriteString(w, title) }