8000 GitHub - csutorasa/gombok: Go code generation library
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

csutorasa/gombok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gombok

Gombok is a go code generation library inspired by Project Lombok.

How to install

Install go version 1.18 or newer.

You can downgrade to 1.13 but cannot use generics here.

Install the generator with the following command:

go install github.com/csutorasa/gombok@v1.18.0

How to use

For command line options you may run gombok -h.

Enable default generation:

//go:generate gombok

This enables processing all files in the project. To disable processing for specific files you can add:

//go:gombok ignore

All generated files have this ignore flag.

You can add the gombok comments or tags to enable code generation.

//go:gombok Stringer
type Example struct {
    //go:gombok Getter
    firstname string
    lastname string `gombokSetter:""`
}

Available generators

About

Go code generation library

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages

0