templates

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderToFile

func RenderToFile(tpl string, filename string, data interface{}) error

func Run

func Run(name string, tpldata interface{}) (*bytes.Buffer, error)

func ToCamel

func ToCamel(s string) string

func TypeIdentifier added in v0.8.5

func TypeIdentifier(t types.Type) string

Types

type Import added in v0.7.0

type Import struct {
	Name  string
	Path  string
	Alias string
}

func (*Import) String added in v0.7.0

func (i *Import) String() string

type Imports added in v0.7.0

type Imports struct {
	// contains filtered or unexported fields
}
var CurrentImports *Imports

CurrentImports this is done with a global because subtemplates currently get called in functions. Lets aim to remove this eventually.

func (*Imports) Lookup added in v0.7.0

func (s *Imports) Lookup(path string) string

func (*Imports) LookupType added in v0.8.4

func (s *Imports) LookupType(t types.Type) string

func (*Imports) Reserve added in v0.7.0

func (s *Imports) Reserve(path string, aliases ...string) (string, error)

func (*Imports) String added in v0.7.0

func (s *Imports) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL