Merge pull request #431 from chihaya/fix-lint-import

Fix path to golint for travis
This commit is contained in:
Justin Li 2018-10-24 13:06:11 -04:00 committed by GitHub
commit bacc7646d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 12 deletions

View file

@ -7,13 +7,13 @@ matrix:
# Using vendored dependencies
- install:
- 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/...
script:
- dep ensure
- go test -v $(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)
- go install github.com/chihaya/chihaya/cmd/chihaya
- chihaya --config=example_config.yaml --debug&
@ -24,12 +24,12 @@ matrix:
# Using HEAD of dependencies
- install:
- 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/...
script:
- go test -v $(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)
- go install github.com/chihaya/chihaya/cmd/chihaya
- chihaya --config=example_config.yaml --debug&
@ -41,12 +41,12 @@ matrix:
# Using HEAD of dependencies
- install:
- 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/...
script:
- go test -v $(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)
- go install github.com/chihaya/chihaya/cmd/chihaya
- chihaya --config=example_config.yaml --debug&

View file

@ -10,14 +10,18 @@ import (
"github.com/chihaya/chihaya/frontend/http"
"github.com/chihaya/chihaya/frontend/udp"
"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/jwt"
_ "github.com/chihaya/chihaya/middleware/torrentapproval"
_ "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/memorybysubnet"
)

View file

@ -10,7 +10,6 @@ import (
"time"
"github.com/minio/sha256-simd"
"github.com/stretchr/testify/require"
"github.com/chihaya/chihaya/pkg/log"

View file

@ -5,8 +5,9 @@ import (
"fmt"
"testing"
"github.com/chihaya/chihaya/bittorrent"
"github.com/stretchr/testify/require"
"github.com/chihaya/chihaya/bittorrent"
)
var configTests = []struct {

View file

@ -6,9 +6,10 @@ import (
"context"
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/chihaya/chihaya/pkg/log"
"github.com/chihaya/chihaya/pkg/stop"
"github.com/prometheus/client_golang/prometheus"
)
// Server represents a standalone HTTP server for serving a Prometheus metrics

View file

@ -2,7 +2,6 @@ package memory
import (
"testing"
"time"
s "github.com/chihaya/chihaya/storage"