Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
dir=$(basename $PWD)
while inotifywait -e modify ./; do
killall "${dir}.test" || true
go test&
done
git reflog expire --expire=1.minute refs/heads/master
git fsck --unreachable
git prune
git gc
_cd_paths=(
'./'
'~/gocode/src'
'~/gocode/src/code.google.com/p/'
'~/gocode/src/github.com/str1ngs'
'~/'
'../'
'~/src'
)
// global variables!
var X *xgbutil.XUtil
var WM *state
var ROOT *window
var CONF *conf
var THEME *theme
var PROMPTS prompts
var (
X *xgbutil.XUtil
diff --git a/id3_test.go b/id3_test.go
index 6b41549..ef65fe7 100644
--- a/id3_test.go
+++ b/id3_test.go
@@ -44,7 +44,7 @@ func TestEmpty(t *testing.T) {
func TestFiles(t *testing.T) {
for _, expected := range fileTests {
- p := path.Join("..", "..", "test", expected.path)
+ p := path.Join("./test", expected.path)
# $Id$
# Maintainer: Vesa Kaihlavirta <[email protected]>
# Maintainer: Alexander Rødseth <[email protected]>
# Contributor: Andres Perera <andres87p gmail>
# Contributor: Matthew Bauer <[email protected]>
# Contributor: Christian Himpel <chressie at gmail dot com>
# Contributor: Mike "str1ngs" Rosset
pkgname=go
pkgver=1
{
"Identity": "test user \[email protected]\u003e",
"Repo": "/home/strings/via/repo",
"Root": "/",
"Plans": "/home/strings/via/plans",
"PlansRepo": "https://code.google.com/p/via.plans",
"Cache": "/home/strings/via/cache",
"DB": "/usr/local/via/"
}
package main
type User struct {
Login string
Blog nil
Public_repos int
Type string
Location string
Company nil
Hireable bool
{
"Name": "bash",
"Version": "4.2",
"Url": "http://mirrors.kernel.org/gnu/bash/bash-4.2.tar.gz"
}
@mrosset
mrosset / main_test.go
Created March 20, 2012 18:04
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...)