templates

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 2 Imported by: 0

README

templates

contains templates for generating various lang of files.

content

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lang added in v0.4.0

type Lang struct {
	Name      string               // Name of the language
	Ext       string               // file extension name, such as 'fm.go'
	Templates []*template.Template // templates for this extension
}

Lang is a language template setting to describe the template and ext filename for protoc-gen-fieldmask.

type Registry

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

Registry is a registry of multi-language templates.

func New

func New() *Registry

func (*Registry) Load

func (r *Registry) Load(lang string) *Lang

func (*Registry) Register

func (r *Registry) Register(lang string, s *Lang)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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