optgen

command module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

README

optgen

Functional Option Generator for go

Usage

Add to tools.go

package tools

import (
	_ "github.com/ecordell/optgen"
)

Anywhere in your codebase, call optgen via go:generate

//go:generate go run github.com/ecordell/optgen . MyConfig 
package mypkg

Features

  • Detects scope and will only generate options for private members if generating in the same package
  • Detects slice and map types and creates functions to append or replace

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