Documentation
¶
Overview ¶
The gohaml package contains a HAML parser similar to the one found at http://www.haml-lang.com.
You can find the specifics about this implementation at http://github.com/realistschuckle/gohaml.
Index ¶
Constants ¶
const ATOM = 57347
const FOR = 57348
const IDENT = 57346
const RANGE = 57349
Variables ¶
var Output inode
Functions ¶
func NewHamlHandler ¶
create an http.Handler that loads haml files from locations relative to base dir, taking into account that they won't end in *haml in the http request. Translates URLs such that:
/bla.html -> ${base}/bla.haml /bla/bla/dingdong.html -> ${base}/bla/bla/dingdong.haml /bla/bla/ -> ${base}/bla/bla/index.haml
Types ¶
type Engine ¶
type Engine struct { Autoclose bool Indentation string IncludeCallback func(string, map[string]interface{}) string // contains filtered or unexported fields }
Engine provides the template interpretation functionality to convert a HAML template into its corresponding tag-based representation.
Available options are:
engine.Options["autoclose"] = true|false, default true
The Options field contains the values to modify the way that the engine produces the markup.
The Indentation field contains the string used by the engine to perform indentation.
The IncludeCallback field contains the callback invoked by the gohaml engine to process other files included through the %include extension.