Skip to content
🏃runs go generate recursively on a specified path or environment variable and can filter by regex
Go
Branch: master
Clone or download
deankarn Merge pull request #1 from temoto/expandenv
use built-in os.ExpandEnv()
Latest commit f25d004 Jan 10, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial Commit of logic Nov 15, 2015
LICENSE Initial commit Nov 15, 2015
README.md Update README.md Jan 13, 2016
doc.go Add README + godoc info + pref for repo change Nov 17, 2015
generate.go use built-in os.ExpandEnv() Jan 10, 2017
generate_test.go Add README + godoc info + pref for repo change Nov 17, 2015
misc.go Ignore expected error Nov 20, 2015

README.md

Package generate

Build Status Go Report Card GoDoc

Package generate runs go generate recursively on a specified path or environment variable like $GOPATH and can filter by regex

Why would I use it?

When ready to compile your application, you may need to do a bunch of setup, run some scripts or even embed static resources and instead of programming that all into a build script just add all that into //go:generate statements then run this to recursively go through and run all the setup for you.

Why was it created?

To be the best friend of https://github.com/go-playground/statics which automatically embeds the go:generate statement that embeds the static resources, but it could be used for anything.

Installation

Use go get.

go get github.com/go-playground/generate

or to update

go get -u github.com/go-playground/generate

Then import the generate package into your own code.

import "github.com/go-playground/generate"

Usage and documentation

Please see https://godoc.org/github.com/go-playground/generate for detailed usage docs.

Example Usage

  • NOTE: this would be from a bash prompt, hence the escaping

generate -i=$GOPATH -ignore=/\. -match=/github.com/MyOrganizationOrUser

run generate -h for all options

License

Distributed under MIT License, please see license file in code for more details.

You can’t perform that action at this time.