Created
October 2, 2013 12:10
-
-
Save fukata/6792725 to your computer and use it in GitHub Desktop.
Guardfile for golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard 'shell' do | |
watch(/.+\.go$/) do |m| | |
`gom test .` | |
end | |
watch(/(.+)\/.+\.go$/) do |m| | |
`gom test ./#{m[1]}` | |
end | |
# 現在編集中のファイルのみをテストしたい場合 | |
# コレを利用する場合、上記のwatch文はコメントアウトした方が良い | |
#watch(/(.*)\/.+\.go$/) do |m| | |
# `gom test ./hoge/const.go ./hoge/hoge.go ./hoge/foo*` | |
#end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment