printer

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Print

func Print(out io.Writer, ifaces []*token.Interface, opts ...PrintOption) error

Types

type PrintOption

type PrintOption func(ctx *context)

PrintOption is a Print+ configuration option.

func WithCamelize

func WithCamelize(enable bool) PrintOption

func WithClientOnly

func WithClientOnly(enable bool) PrintOption

WithClientOnly makes the printer generate only client-side code.

func WithGofmt

func WithGofmt(enable bool) PrintOption

WithGofmt gofmts generated code, enabled by default.

Not recommended to disable it, only for debugging the output, because gofmt works as a validation step as well.

func WithPackageName

func WithPackageName(name string) PrintOption

WithPackageName overrides the package name of generated code.

func WithPrefixes

func WithPrefixes(prefixes []string) PrintOption

WithPrefixes prefixes to strip from interface names, be careful when using it may lead to compilation errors.

func WithServerOnly

func WithServerOnly(enable bool) PrintOption

WithServerOnly makes the printer generate only server-side code.

Jump to

Keyboard shortcuts

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