Skip to content

Instantly share code, notes, and snippets.

@rkulla rkulla/go
Last active Aug 23, 2016

Embed
What would you like to do?
go wrapper to "go run" implicitly when you type "go *.go"
#!/bin/bash
# Simple go wrapper for typing "go file.go" instead of "go run file.go"
# Allows flags and wildcards as usual.
#
# Installation: Copy this wrapper to first in PATH, e.g. $GOPATH/bin
realgo=/usr/local/go/bin/go
if (( $# > 0 )) && [[ "$1" = *.go ]]; then
$realgo run "$@"
else
$realgo "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.