writer

package
v1.26.7 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteAST added in v1.20.1

func WriteAST(w io.Writer, i *importer.Importer, node ast.Node)

Types

type BaseWriter added in v1.20.1

type BaseWriter struct {
	bytes.Buffer
}

func (*BaseWriter) Line added in v1.20.1

func (w *BaseWriter) Line()

func (*BaseWriter) W added in v1.20.1

func (w *BaseWriter) W(format string, args ...interface{})

type GoLangWriter added in v1.20.1

type GoLangWriter struct {
	BaseWriter
}

func NewGoLangWriter added in v1.20.1

func NewGoLangWriter() *GoLangWriter

func (*GoLangWriter) GetFormatType added in v1.20.1

func (w *GoLangWriter) GetFormatType(importFn func(string, string) string, valueId string, f *stdtypes.Var) string

func (*GoLangWriter) WriteCheckErr added in v1.20.1

func (w *GoLangWriter) WriteCheckErr(body func())

func (*GoLangWriter) WriteConvertType added in v1.20.1

func (w *GoLangWriter) WriteConvertType(
	importFn func(string, string) string, assignId, valueId string, f *stdtypes.Var, sliceErr string, declareVar bool, msgErrTemplate string,
)

func (*GoLangWriter) WriteDefer added in v1.20.1

func (w *GoLangWriter) WriteDefer(params []string, calls []string, body func())

func (*GoLangWriter) WriteFunc added in v1.20.1

func (w *GoLangWriter) WriteFunc(name, recv string, params, results []string, body func())

func (*GoLangWriter) WriteFuncCall added in v1.20.1

func (w *GoLangWriter) WriteFuncCall(id, name string, params []string)

func (*GoLangWriter) WriteSignature added in v1.20.1

func (w *GoLangWriter) WriteSignature(keyvals []string)

func (*GoLangWriter) WriteStruct added in v1.20.1

func (w *GoLangWriter) WriteStruct(keyvals []string, assign bool)

func (*GoLangWriter) WriteStructAssign added in v1.20.1

func (w *GoLangWriter) WriteStructAssign(keyvals []string)

func (*GoLangWriter) WriteStructDefined added in v1.20.1

func (w *GoLangWriter) WriteStructDefined(keyvals []string)

func (*GoLangWriter) WriteType added in v1.20.1

func (w *GoLangWriter) WriteType(name string)

func (*GoLangWriter) WriteTypeStruct added in v1.20.1

func (w *GoLangWriter) WriteTypeStruct(name string, keyvals []string)

Jump to

Keyboard shortcuts

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