generator

package
v0.0.0-...-e9f1ba3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator is a proto generator for NanoRPC

func NewGenerator

func NewGenerator(p *protogen.Plugin) (*Generator, error)

NewGenerator assembles a nanorpc protoc generator

func (*Generator) T

func (gen *Generator) T(name string, out io.Writer, data any) error

T find a template, combines it with given data, and renders it onto the given Writer

func (*Generator) WithTemplates

func (gen *Generator) WithTemplates(root *template.Template, templates fs.FS) error

WithTemplates loads embedded templates/**.gotmpl into an existing template.Template

Jump to

Keyboard shortcuts

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