Skip to content

tzmfreedom/protoc-gen-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protoc-gen-template

A protoc plugin to output file with text/template literal

Install

$ go get github.com/tzmfreedom/protoc-gen-template

Usage

generate class files with following command

$ protoc -I. --template_out=template=go.template:. target.proto

You should write template file with text/template

type {{ .Prefix }}{{ .Type.Name }} struct {
    {{ range .Type.Field }}{{ getName .Name }} {{ propertyType . $.PackageName }}
    {{ end }}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published