Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 477 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 477 Bytes

go-genconstructor

Constructor generator for Go.

Usage

    //genconstructor [-p]
    type Foo struct {
        key string `required:"[constValue]"`
    }

with go generate command

    //go:generate go-genconstructor

Example

def ./_example/person.go

generated ./_example/example_constructor_gen.go

Installation

$ go get github.com/hori-ryota/go-genconstructor