Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Header = Tr[string](AtPackage, `package {{ . }}
`)
View Source
var Import = Tr[map[string]string](AtImport, `
import (
{{ range $key, $val := . }}
{{- $key }} {{ $val }}
{{ end }}
)
`)
Functions ¶
func Tr ¶
func Tr[Data any](w CodePosition, t string) templateRenderer[Data]
Types ¶
type CodePosition ¶
type CodePosition int
const ( AtPackage CodePosition = 0 + iota AtImport AtConstants AtTypes AtConstructor AtMethod AtFunc AtEOF )
type Renderer ¶
type Renderer[Data any] interface { With(d Data) RendererResult }
Click to show internal directories.
Click to hide internal directories.