gombok

command module
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 16 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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