Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Go-playground/generate

:runner:runs go generate recursively on a specified path or environment variable and can filter by regex
https://github.com/Go-playground/generate

generate

Last synced: 20 days ago
JSON representation

:runner:runs go generate recursively on a specified path or environment variable and can filter by regex

Awesome Lists containing this project

README

        

Package generate
================

[![Build Status](https://semaphoreci.com/api/v1/projects/fb48dccf-14ed-4561-b29f-8c6f5711cca5/606486/badge.svg)](https://semaphoreci.com/joeybloggs/generate)
[![Go Report Card](http://goreportcard.com/badge/go-playground/generate)](http://goreportcard.com/report/go-playground/generate)
[![GoDoc](https://godoc.org/github.com/go-playground/generate?status.svg)](https://godoc.org/github.com/go-playground/generate)

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](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.