templates

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call added in v0.8.2

func Call(p *types.Func) string

func Dump added in v0.8.2

func Dump(val interface{}) string

func Funcs added in v0.8.2

func Funcs() template.FuncMap

func Render added in v0.8.2

func Render(cfg Options) error

func ToCamel

func ToCamel(s string) string

func ToGo added in v0.8.2

func ToGo(name string) string

func ToGoPrivate added in v0.8.2

func ToGoPrivate(name string) string

func TypeIdentifier added in v0.8.2

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

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.2

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

type Options added in v0.8.2

type Options struct {
	PackageName     string
	Filename        string
	RegionTags      bool
	GeneratedHeader bool
	Data            interface{}
}

Jump to

Keyboard shortcuts

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