writer

package
v2.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteAST

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

Types

type BaseWriter

type BaseWriter struct {
	bytes.Buffer
}

func (*BaseWriter) Line

func (w *BaseWriter) Line()

func (*BaseWriter) W

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

type GoLangWriter

type GoLangWriter struct {
	BaseWriter
}

func (*GoLangWriter) WriteCheckErr

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

func (*GoLangWriter) WriteConvertType

func (w *GoLangWriter) WriteConvertType(
	importFn func(string, string) string, assignId, valueId string, f *stdtypes.Var, errRet []string, errSlice string, declareVar bool, msgErrTemplate string,
)

func (*GoLangWriter) WriteDefer

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

func (*GoLangWriter) WriteFormatType

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

func (*GoLangWriter) WriteFunc

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

func (*GoLangWriter) WriteFuncCall

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

func (*GoLangWriter) WriteSignature

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

func (*GoLangWriter) WriteStruct

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

func (*GoLangWriter) WriteStructAssign

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

func (*GoLangWriter) WriteStructDefined

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

func (*GoLangWriter) WriteType

func (w *GoLangWriter) WriteType(name string)

func (*GoLangWriter) WriteTypeStruct

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

func (*GoLangWriter) WriteVarGroup

func (w *GoLangWriter) WriteVarGroup(body func())

Jump to

Keyboard shortcuts

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