GithubHelp home page GithubHelp logo

isabella232 / go-generate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from palantir/go-generate

0.0 0.0 0.0 14.89 MB

Go tool that runs and verifies the output of go generate

License: Apache License 2.0

Shell 25.64% Go 74.36%

go-generate's Introduction

Autorelease

go-generate

go-generate is a tool that runs go generate in directories specified in the configuration. The configuration also enables the specification of the files or directories that are expected to be produced by go generate, and can be run in verify mode to verify whether any of the output files changed as a result of running the generator.

Usage

Run ./go-generate --config=generate.yml to run the go generate command in the directories specified by the configuration.

Run ./go-generate --config=generate.yml --verify to verify that running the go generate command for the specified configuration did not change any of the files or directories specified by the configuration. If any of the matching paths did change, the program prints the differences and exits with a non-0 exit code.

Configuration

The configuration file specifies the "generate" configurations, which consist of the relative path to the directory in which go generate should be run and matcher configuration that specifies the paths or files that should be examined to determine whether or not running go generate resulted in a change. All relative paths (both for the go generate location and the matchers) are evaluated relative to the working directory of the command.

Here is an example configuration file:

generators:
  foo:
    go-generate-dir: gen
    gen-paths:
      paths:
        - "gen/output.txt"

go-generate's People

Contributors

svc-excavator-bot avatar nmiyake avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.