Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
Debug is a global flag, which is only used by the command line program to track errors down.
Functions ¶
func RewriteHTML ¶
RewriteTemplate reads the given file, applies it as a template and writes it back again (as *.html).
Types ¶
type BuildInfo ¶
type BuildInfo struct { // Time of this build. Time time.Time // Version contains a hash or something else which uniquely identifies this build. Version string // CompileError is nil or contains a compile error. CompileError error // HotReload is true, if the server should be polled at /api/v1/poll/version. HotReload bool // Wasm is true, if the web assembly (app.wasm) is available. Wasm bool // Commit may be empty, if the project is not contained in a git repository. Commit string // Host name. Host string // Compiler denotes the compiler which has created the wasm build. Compiler string // Extra may be nil or injected by user. Extra interface{} }
BuildInfo provides some basic information about a gotrino build.
type CompileErr ¶
type CompileErr struct {
// contains filtered or unexported fields
}
A CompileErr denotes a special build error, which is solely related to applying templates or the go compiler.
func (CompileErr) Error ¶
func (b CompileErr) Error() string
func (CompileErr) Unwrap ¶
func (b CompileErr) Unwrap() error
type Options ¶
type Options struct { Force bool HotReload bool TemplatePatterns []string Extra interface{} Debug bool GoGenerate bool }
Options to use for building.
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
A Project is kept usually in-memory to efficiently (re-)build a Go module with dependent other modules.
func NewProject ¶
NewProject allocates a new project and setups one-time things.
Click to show internal directories.
Click to hide internal directories.