go-gen

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

README

go-gen

generate golang source code by go generate command

install go-gen

go install github.com/goools/go-gen

Enum

example
package enum

//go:generate go-gen -v gen enum EnumA EnumB
type EnumA int
type EnumB int

const (
	// comment EnumANone
	//
	EnumANone EnumA = iota
	EnumANone2
)

Sync Map

example
package syncmap

//go:generate go-gen -v gen syncmap Pill<int,int> Pill2<string,int> Pill3<string,encoding/json.Number>

Sync Pool

example
package syncpool

//go:generate go-gen -v gen syncpool Pill<int> Pill2<string> Pill3<encoding/json.Number> Pill4<Pill>

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