Skip to content

builder-pattern-codegen contains a template-driven engine for golang to generate builder pattern code from structure definiation.

License

Notifications You must be signed in to change notification settings

mynktl/builder-pattern-codegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

builder-pattern-codegen

This tool generates builder-pattern code for golang.

How to build

To build executable, execute following command:

go build

How to generate builder-pattern code

To generate builder-pattern code for your structure, define your structure in following way:

package PACKAGE_NAME

type STRUCTURE_NAME struct {
    field1 type // comment
    field2 type //comment
}

Define your package name and license in following way:

//
// LICENSE 
//

To generate code, use following command:

builder-pattern-codegen -file=./example/structure -dir=$PWD/generated -boilerplate=./example/boilerplate

Note: Make sure directory exists.

About

builder-pattern-codegen contains a template-driven engine for golang to generate builder pattern code from structure definiation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages