code_gen_utils

package
v0.0.0-...-69b3a69 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File = file{}
View Source
var Languages = codeGenLanguages{}

Functions

This section is empty.

Types

type CodeGenFile

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

func (*CodeGenFile) AddImport

func (c *CodeGenFile) AddImport(pkgName, identifier string)

func (*CodeGenFile) AppendCode

func (c *CodeGenFile) AppendCode(code string)

func (*CodeGenFile) AppendToHeader

func (c *CodeGenFile) AppendToHeader(str string)

func (CodeGenFile) NewComment

func (c CodeGenFile) NewComment(comment string) string

func (CodeGenFile) NewCommentWithIndent

func (c CodeGenFile) NewCommentWithIndent(comment string, indent int) string

func (CodeGenFile) Render

func (c CodeGenFile) Render() string

func (CodeGenFile) RenderImports

func (c CodeGenFile) RenderImports() string

type CodeGenLanguage

type CodeGenLanguage interface {
	Name() string
	NewComment(comment string) string
	NewCommentWithIndent(comment string, indent int) string
	RenderImports(imports []codeGenImport) string
}

Jump to

Keyboard shortcuts

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