Merge pull request #431 from chihaya/fix-lint-import
Fix path to golint for travis
This commit is contained in:
commit
bacc7646d0
6 changed files with 16 additions and 12 deletions
12
.travis.yml
12
.travis.yml
|
@ -7,13 +7,13 @@ matrix:
|
||||||
# Using vendored dependencies
|
# Using vendored dependencies
|
||||||
- install:
|
- install:
|
||||||
- go get -u github.com/golang/dep/...
|
- go get -u github.com/golang/dep/...
|
||||||
- go get -u github.com/golang/lint/...
|
- go get -u golang.org/x/lint/golint
|
||||||
- go get -u golang.org/x/tools/cmd/...
|
- go get -u golang.org/x/tools/cmd/...
|
||||||
script:
|
script:
|
||||||
- dep ensure
|
- dep ensure
|
||||||
- go test -v $(go list ./...)
|
- go test -v $(go list ./...)
|
||||||
- go vet $(go list ./...)
|
- go vet $(go list ./...)
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
- diff <(goimports -local github.com/chihaya/chihaya -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||||
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||||
- go install github.com/chihaya/chihaya/cmd/chihaya
|
- go install github.com/chihaya/chihaya/cmd/chihaya
|
||||||
- chihaya --config=example_config.yaml --debug&
|
- chihaya --config=example_config.yaml --debug&
|
||||||
|
@ -24,12 +24,12 @@ matrix:
|
||||||
# Using HEAD of dependencies
|
# Using HEAD of dependencies
|
||||||
- install:
|
- install:
|
||||||
- go get -t ./...
|
- go get -t ./...
|
||||||
- go get -u github.com/golang/lint/...
|
- go get -u golang.org/x/lint/golint
|
||||||
- go get -u golang.org/x/tools/cmd/...
|
- go get -u golang.org/x/tools/cmd/...
|
||||||
script:
|
script:
|
||||||
- go test -v $(go list ./...)
|
- go test -v $(go list ./...)
|
||||||
- go vet $(go list ./...)
|
- go vet $(go list ./...)
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
- diff <(goimports -local github.com/chihaya/chihaya -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||||
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||||
- go install github.com/chihaya/chihaya/cmd/chihaya
|
- go install github.com/chihaya/chihaya/cmd/chihaya
|
||||||
- chihaya --config=example_config.yaml --debug&
|
- chihaya --config=example_config.yaml --debug&
|
||||||
|
@ -41,12 +41,12 @@ matrix:
|
||||||
# Using HEAD of dependencies
|
# Using HEAD of dependencies
|
||||||
- install:
|
- install:
|
||||||
- go get -t ./...
|
- go get -t ./...
|
||||||
- go get -u github.com/golang/lint/...
|
- go get -u golang.org/x/lint/golint
|
||||||
- go get -u golang.org/x/tools/cmd/...
|
- go get -u golang.org/x/tools/cmd/...
|
||||||
script:
|
script:
|
||||||
- go test -v $(go list ./...)
|
- go test -v $(go list ./...)
|
||||||
- go vet $(go list ./...)
|
- go vet $(go list ./...)
|
||||||
- diff <(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
- diff <(goimports -local github.com/chihaya/chihaya -d $(find . -type f -name '*.go' -not -path "./vendor/*")) <(printf "")
|
||||||
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
- (for d in $(go list ./...); do diff <(golint $d) <(printf "") || exit 1; done)
|
||||||
- go install github.com/chihaya/chihaya/cmd/chihaya
|
- go install github.com/chihaya/chihaya/cmd/chihaya
|
||||||
- chihaya --config=example_config.yaml --debug&
|
- chihaya --config=example_config.yaml --debug&
|
||||||
|
|
|
@ -10,14 +10,18 @@ import (
|
||||||
"github.com/chihaya/chihaya/frontend/http"
|
"github.com/chihaya/chihaya/frontend/http"
|
||||||
"github.com/chihaya/chihaya/frontend/udp"
|
"github.com/chihaya/chihaya/frontend/udp"
|
||||||
"github.com/chihaya/chihaya/middleware"
|
"github.com/chihaya/chihaya/middleware"
|
||||||
|
)
|
||||||
|
|
||||||
// Imported to register as middleware drivers.
|
import (
|
||||||
|
// Imports to register middleware drivers.
|
||||||
_ "github.com/chihaya/chihaya/middleware/clientapproval"
|
_ "github.com/chihaya/chihaya/middleware/clientapproval"
|
||||||
_ "github.com/chihaya/chihaya/middleware/jwt"
|
_ "github.com/chihaya/chihaya/middleware/jwt"
|
||||||
_ "github.com/chihaya/chihaya/middleware/torrentapproval"
|
_ "github.com/chihaya/chihaya/middleware/torrentapproval"
|
||||||
_ "github.com/chihaya/chihaya/middleware/varinterval"
|
_ "github.com/chihaya/chihaya/middleware/varinterval"
|
||||||
|
)
|
||||||
|
|
||||||
// Imported to register as storage drivers.
|
import (
|
||||||
|
// Imports to register storage drivers.
|
||||||
_ "github.com/chihaya/chihaya/storage/memory"
|
_ "github.com/chihaya/chihaya/storage/memory"
|
||||||
_ "github.com/chihaya/chihaya/storage/memorybysubnet"
|
_ "github.com/chihaya/chihaya/storage/memorybysubnet"
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,7 +10,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/minio/sha256-simd"
|
"github.com/minio/sha256-simd"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/chihaya/chihaya/pkg/log"
|
"github.com/chihaya/chihaya/pkg/log"
|
||||||
|
|
|
@ -5,8 +5,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/chihaya/chihaya/bittorrent"
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
"github.com/chihaya/chihaya/bittorrent"
|
||||||
)
|
)
|
||||||
|
|
||||||
var configTests = []struct {
|
var configTests = []struct {
|
||||||
|
|
|
@ -6,9 +6,10 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
|
||||||
"github.com/chihaya/chihaya/pkg/log"
|
"github.com/chihaya/chihaya/pkg/log"
|
||||||
"github.com/chihaya/chihaya/pkg/stop"
|
"github.com/chihaya/chihaya/pkg/stop"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Server represents a standalone HTTP server for serving a Prometheus metrics
|
// Server represents a standalone HTTP server for serving a Prometheus metrics
|
||||||
|
|
|
@ -2,7 +2,6 @@ package memory
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
s "github.com/chihaya/chihaya/storage"
|
s "github.com/chihaya/chihaya/storage"
|
||||||
|
|
Loading…
Reference in a new issue