mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-11 15:33:31 -07:00
Merge pull request #431 from chihaya/fix-lint-import
Fix path to golint for travis
This commit is contained in:
+6
-6
@@ -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&
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/minio/sha256-simd"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/chihaya/chihaya/pkg/log"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,7 +2,6 @@ package memory
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"time"
|
||||
|
||||
s "github.com/chihaya/chihaya/storage"
|
||||
|
||||
Reference in New Issue
Block a user