package gemini import ( "io" "net/url" "tildegit.org/tjp/sliderule/internal" "tildegit.org/tjp/sliderule/internal/types" ) type proto struct{} func (p proto) TemporaryRedirect(u *url.URL) *types.Response { return Redirect(u.String()) } func (p proto) PermanentRedirect(u *url.URL) *types.Response { return PermanentRedirect(u.String()) } func (p proto) TemporaryServerError(err error) *types.Response { return Failure(err) } func (p proto) PermanentServerError(err error) *types.Response { return PermanentFailure(err) } func (p proto) CGIFailure(err error) *types.Response { return CGIError(err.Error()) } func (p proto) Success(filename string, body io.Reader) *types.Response { return Success(internal.MediaType(filename), body) } func (p proto) ParseResponse(input io.Reader) (*types.Response, error) { return ParseResponse(input) } var ServerProtocol types.ServerProtocol = proto{}