godev

command module
v0.0.0-...-84cba2f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2015 License: MIT Imports: 16 Imported by: 0

README

devrun

A program to build, run, and restart a Go program on code change. It also supports watching all your Go imports too. So if you change the code of a library, your app will recompile.

This is not thoroughly tested. Report any issues you have.

Notes

The watch subcommand will run whatever commands you pass in its own shell. What it does behind the scenes is run sh -c "your commands here". For example, devrun watch go test will run sh -c "go test". This means you can use any one liner shell script in here. This also means that if you have a long running process (the process doesn't exit in a short amount of time) such as a webserver or other service, you must use "exec" if you want devrun to be able to kill it and restart the process.

Examples
devrun watch --exclude-files "^(.*_test\.go)$" --include-files "^(.*\.go|.*\.yaml|.*\.conf)$" "godep go build && exec ./prog run"

devrun watch go test

devrun watch -- go test -run="TestFunc"

devrun watch exec ./webserver
TODO

Would be neat to incorporate https://github.com/daviddengcn/go-diff and only recompile when the Go code semantically changes.

Documentation

Overview

helps in developing the application by having source code change detection, recompiliation, and rerunning.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL