Documentation
¶
Index ¶
Constants ¶
const FileExtension string = ".hact"
FileExtension is constant for the file-extension used for hactor files.
Here is an example of a hactor file-name that has the ".hact" file-extension:
readme.hact
const MediaType string = "text/actor+html"
MediaType is a constant for the media-type used for hactor content.
Note that the value of the HTTP Content-Type response header and the HTTP Accept request header both use media-types.
Variables ¶
This section is empty.
Functions ¶
func Transform ¶
Transform accepts hactor data and return HTML.
Note that the HTML is NOT a full HTML page.
func WrapHTTPHandler ¶
WrapHTTPHandler provides http.Handler middleware.
If the http.Handler WrapHTTPHandler returns sees the "text/actor+html" media-type in the "Content-Type" response header generated by the sub-http.Handler AND "text/actor+html" isn't in the "Accept" request header, then it will transform the body to (regular) HTML (and change the "Content-Type" header to "text/html").