gener8

command module
v0.0.0-...-005d958 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 10 Imported by: 0

README

gener8

simple golang go:generate code generator

install

go get github.com/dbreedt/gener8

supported parameters

skip_format: skip gofmt being run on the generated file
trace      : enables trace logging
in         : file to parse
out        : file to write the generated code to
pkg        : the value to replace $pkg with
kws        : csv list of values to replace $kwn tokens with

usage

Create a file with markers

  • $pkg
  • $kwn where n is a numeric value starting from 1

Then add a go:generate comment to your codebase

//go:generate gener8 -in=make.me -out=made.go -pkg=made -kws=test,tPtr

or just run it from the cmdline:

gener8 -in=make.me -out=made.go -pkg=made -kws=test,tPtr

In these examples $kw1 will be replaced with test and $kw2 will be replaced with tPtr

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