Skip to content

Instantly share code, notes, and snippets.

@mrosset
Created March 20, 2012 18:04
Show Gist options
  • Save mrosset/2138855 to your computer and use it in GitHub Desktop.
Save mrosset/2138855 to your computer and use it in GitHub Desktop.
running command packages with go test
package main
import (
"os"
"testing"
)
func TestBuild(t *testing.T) {
args := []string{"build", "ccache"}
os.Args = append(os.Args, args...)
main()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment