gen

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTemplate

func ApplyTemplate(w io.Writer, f *protogen.File, opts Options) error

This function is called with a param which contains the entire definition of a method.

Types

type Options

type Options struct {
	// marshal options
	Multiline       bool
	UseEnumNumbers  bool
	EmitUnpopulated bool
	UseProtoNames   bool
	// options both work in marshal and unmarshal options
	AllowPartial bool
	// unmarshal options
	DiscardUnknown bool

	// generate sql.Scanner and driver.Valuer method for message
	SqlSupport bool
}

Options are the options to set for rendering the template.

Jump to

Keyboard shortcuts

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