I hereby claim:
- I am paddycarver on github.
- I am paddycarver (https://keybase.io/paddycarver) on keybase.
- I have a public key ASD5wBuaVIpLpcjb7XF-30QZy-QAMdIMSjzFMpIq65X_1Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function prompt_char { | |
git branch >/dev/null 2>/dev/null && echo '%' && return | |
echo '$' | |
} | |
function get_directory { | |
DIR=${PWD/#$HOME/\~} | |
if [[ ! -f ~/.specialdirs || ! -r ~/.specialdirs ]]; then | |
echo $DIR && return | |
fi |
#! /bin/bash | |
go get -u github.com/golang/lint/golint | |
go get -u github.com/paddyforan/combinedcoverage | |
go get -u github.com/wadey/gocovmerge | |
cd $GOPATH/src/path/to/your/package | |
go vet $(go list ./... | grep -v '/vendor/') | |
go list ./... | grep -v /vendor/ | xargs -L1 golint | |
mkdir -p coverage |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
func useComputer(tourists chan int, done chan struct{}) { |
SUBPACKAGES := $(foreach pkg,$(sort $(dir $(shell find . -type f -name '*.go'))),$(patsubst %/,%,${pkg})) | |
# run tests with coverage reports. | |
test: | |
@${GO} vet ./... | |
@mkdir -p coverage | |
@for pkg in ${SUBPACKAGES}; do \ | |
go test $$pkg -v -coverprofile=coverage/$${pkg/\//.}.out; \ | |
done |
$ cat /proc/meminfo | |
MemTotal: 3800808 kB | |
MemFree: 163492 kB | |
MemAvailable: 2301612 kB | |
Buffers: 147920 kB | |
Cached: 2088052 kB | |
SwapCached: 0 kB | |
Active: 2386304 kB | |
Inactive: 999916 kB | |
Active(anon): 1150640 kB |
path := strings.TrimRight(os.Getenv("GOPATH"), "/") + "/src/github.com/DramaFever/go-logging/log.go" | |
line := 463 | |
if testing.Coverage() > 0 { | |
path = "github.com/DramaFever/go-logging/_test/_obj_test/log.go" | |
line = 448 | |
} |
package main | |
import ( | |
"net/http" | |
"github.com/gorilla/mux" | |
) | |
func main() { | |
http.Handle("/", getRouter()) |
package main | |
import ( | |
"crypto/rand" | |
"crypto/sha256" | |
"fmt" | |
"time" | |
"code.google.com/p/go.crypto/pbkdf2" | |
) |
FROM google/golang | |
RUN go get github.com/tools/godep | |
RUN go get github.com/bmizerany/assert | |
ADD . /gopath/src/github.com/bitly/nsq | |
RUN godep get github.com/bitly/nsq/... | |
RUN cd /gopath/src/github.com/bitly/nsq && godep restore |