codegen

package
v0.377.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneratedFile

type GeneratedFile struct {
	Contents string
	Path     string
}

type GeneratedFiles

type GeneratedFiles []*GeneratedFile

GeneratedFiles represents a collection of files due to be generated as part of code generation You can append any number of files to an instance of GeneratedFiles like so: files := GeneratedFiles{} files = append(files, &GeneratedFile{...}) And then once you are ready to write these files to disk, you can call write: files.Write(dir)

func (GeneratedFiles) Write

func (files GeneratedFiles) Write(dir string) error

type Writer

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

Writer can be used by any codegeneration utility to build up a code string, and it is agnostic to the target language being generated

func (*Writer) Dedent

func (w *Writer) Dedent()

func (*Writer) Indent

func (w *Writer) Indent()

func (*Writer) String

func (w *Writer) String() string

func (*Writer) Write

func (w *Writer) Write(v string)

func (*Writer) Writef

func (w *Writer) Writef(v string, a ...any)

func (*Writer) Writeln

func (w *Writer) Writeln(v string)

Jump to

Keyboard shortcuts

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