go-getter

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 15 Imported by: 0

README

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 ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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