codegenutil

package
v0.0.0-...-dd1d5c9 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFormattedGoSource

func NewFormattedGoSource(source io.WriterTo) io.WriterTo

Types

type CodeBuilder

type CodeBuilder struct {
	// contains filtered or unexported fields
}

func NewCodeBuilder

func NewCodeBuilder() *CodeBuilder

func (*CodeBuilder) Embed

func (cb *CodeBuilder) Embed(template io.WriterTo)

func (*CodeBuilder) Line

func (cb *CodeBuilder) Line(format string, args ...interface{})

func (*CodeBuilder) PopIndent

func (cb *CodeBuilder) PopIndent()

func (*CodeBuilder) PushIndent

func (cb *CodeBuilder) PushIndent()

func (*CodeBuilder) WriteTo

func (cb *CodeBuilder) WriteTo(output io.Writer) (int64, error)

type FormattedGoSource

type FormattedGoSource struct {
	Source io.WriterTo
}

func (*FormattedGoSource) WriteTo

func (fgs *FormattedGoSource) WriteTo(output io.Writer) (int64, error)

type GoImports

type GoImports struct {
	// contains filtered or unexported fields
}

func NewGoImports

func NewGoImports() *GoImports

func (*GoImports) Obj

func (imports *GoImports) Obj(fullName string) *importObject

This supports accessing objects of the form:

*(\[\])*(\*)*)*(<full module path>\.)?<object>({})?

map objects are not supported

func (*GoImports) WriteTo

func (imports *GoImports) WriteTo(output io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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