mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Add circle.yml, lint etc
This commit is contained in:
25
circle.yml
Normal file
25
circle.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
machine:
|
||||
services:
|
||||
- docker
|
||||
environment:
|
||||
GOPATH: /home/ubuntu
|
||||
SRCDIR: /home/ubuntu/src/github.com/weaveworks/tools
|
||||
PATH: $PATH:$HOME/bin
|
||||
|
||||
dependencies:
|
||||
post:
|
||||
- go clean -i net
|
||||
- go install -tags netgo std
|
||||
- mkdir -p $(dirname $SRCDIR)
|
||||
- cp -r $(pwd)/ $SRCDIR
|
||||
- go get \
|
||||
github.com/golang/lint/golint \
|
||||
github.com/fzipp/gocyclo \
|
||||
github.com/kisielk/errcheck
|
||||
|
||||
test:
|
||||
override:
|
||||
- cd $SRDDIR; ./lint .
|
||||
- cd $SRCDIR/cover; make
|
||||
- cd $SRCDIR/socks; make
|
||||
|
||||
11
cover/Makefile
Normal file
11
cover/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
.PHONY: all clean
|
||||
|
||||
all: cover
|
||||
|
||||
cover: *.go
|
||||
go get -tags netgo ./$(@D)
|
||||
go build -ldflags "-extldflags \"-static\" -linkmode=external" -tags netgo -o $@ ./$(@D)
|
||||
|
||||
clean:
|
||||
rm -rf cover
|
||||
go clean ./...
|
||||
2
lint
2
lint
@@ -95,7 +95,7 @@ function lint {
|
||||
|
||||
# Don't lint this script or static.go
|
||||
case "${filename}" in
|
||||
./bin/lint) return;;
|
||||
./lint) return;;
|
||||
./app/static.go) return;;
|
||||
./coverage.html) return;;
|
||||
esac
|
||||
|
||||
@@ -4,13 +4,13 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
"os"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
socks5 "github.com/armon/go-socks5"
|
||||
"github.com/weaveworks/weave/common/mflagext"
|
||||
"github.com/docker/docker/pkg/mflag"
|
||||
"github.com/weaveworks/weave/common/mflagext"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -73,7 +73,7 @@ func (r aliasingResolver) Resolve(name string) (net.IP, error) {
|
||||
func socksProxy(aliases map[string]string) {
|
||||
conf := &socks5.Config{
|
||||
Resolver: aliasingResolver{
|
||||
aliases: aliases,
|
||||
aliases: aliases,
|
||||
NameResolver: socks5.DNSResolver{},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user