Skip to content

go-getter is a tool to generate getter methods for struct fields.

License

Notifications You must be signed in to change notification settings

josestg/go-getter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-getter

go-getter is a tool to generate getter methods for struct fields.

Install

go install github.com/josestg/go-getter@latest

Example

go-getter -typ User -src examples/user.go -out examples/user.gen.go -ptr=false

or using go:generate directive

// Path: examples/todo.go

package examples

//go:generate go-getter -typ Todo -src $GOFILE -out ./todo.gen.go
type Todo struct {
    title     string
    completed bool
}
go generate ./...

About

go-getter is a tool to generate getter methods for struct fields.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages