Skip to content
Permalink
Browse files

golang.org/x/net/context => context (#201)

  • Loading branch information...
houz42 authored and devnev committed Jul 23, 2019
1 parent 606c733 commit e0797f438f94f4d032395b8f71aae0e73d6efa08
Showing with 227 additions and 139 deletions.
  1. +2 −1 auth/auth.go
  2. +4 −7 auth/auth_test.go
  3. +2 −1 auth/examples_test.go
  4. +1 −1 auth/metadata.go
  5. +1 −1 auth/metadata_test.go
  6. +2 −1 chain.go
  7. +1 −1 chain_test.go
  8. +2 −1 logging/common.go
  9. +1 −1 logging/logrus/client_interceptors.go
  10. +2 −1 logging/logrus/context.go
  11. +2 −1 logging/logrus/ctxlogrus/context.go
  12. +2 −1 logging/logrus/ctxlogrus/examples_test.go
  13. +1 −1 logging/logrus/examples_test.go
  14. +2 −1 logging/logrus/options_test.go
  15. +1 −1 logging/logrus/payload_interceptors.go
  16. +1 −1 logging/logrus/payload_interceptors_test.go
  17. +1 −1 logging/logrus/server_interceptors.go
  18. +1 −1 logging/logrus/shared_test.go
  19. +1 −1 logging/zap/client_interceptors.go
  20. +2 −1 logging/zap/context.go
  21. +2 −1 logging/zap/ctxzap/context.go
  22. +3 −2 logging/zap/options_test.go
  23. +1 −1 logging/zap/payload_interceptors.go
  24. +3 −5 logging/zap/payload_interceptors_test.go
  25. +1 −1 logging/zap/server_interceptors.go
  26. +1 −1 logging/zap/shared_test.go
  27. +2 −1 makefile
  28. +2 −1 recovery/interceptors.go
  29. +1 −1 recovery/interceptors_test.go
  30. +1 −1 recovery/options.go
  31. +1 −1 retry/examples_test.go
  32. +1 −1 retry/options.go
  33. +1 −1 retry/retry.go
  34. +1 −1 retry/retry_test.go
  35. +2 −1 tags/interceptors.go
  36. +1 −2 tags/interceptors_test.go
  37. +2 −1 tags/logrus/context.go
  38. +2 −1 tags/zap/context.go
  39. +3 −4 testing/interceptor_suite.go
  40. +1 −1 testing/pingservice.go
  41. +148 −69 testing/testproto/test.pb.go
  42. +1 −1 tracing/opentracing/client_interceptors.go
  43. +4 −6 tracing/opentracing/interceptors_test.go
  44. +1 −2 tracing/opentracing/metadata.go
  45. +2 −1 tracing/opentracing/server_interceptors.go
  46. +1 −1 util/metautils/nicemd.go
  47. +1 −1 util/metautils/nicemd_test.go
  48. +2 −1 validator/validator.go
  49. +2 −1 wrappers.go
  50. +1 −1 wrappers_test.go
@@ -4,8 +4,9 @@
package grpc_auth

import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -4,13 +4,9 @@
package grpc_auth_test

import (
"testing"

"github.com/stretchr/testify/suite"
"google.golang.org/grpc"

"context"
"fmt"

"testing"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware/auth"
@@ -19,8 +15,9 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
"github.com/stretchr/testify/suite"
"golang.org/x/oauth2"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials/oauth"
"google.golang.org/grpc/metadata"
@@ -1,9 +1,10 @@
package grpc_auth_test

import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware/auth"
"github.com/grpc-ecosystem/go-grpc-middleware/tags"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
)
@@ -4,10 +4,10 @@
package grpc_auth

import (
"context"
"strings"

"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
)
@@ -4,11 +4,11 @@
package grpc_auth

import (
"context"
"testing"

"github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
@@ -6,7 +6,8 @@
package grpc_middleware

import (
"golang.org/x/net/context"
"context"

"google.golang.org/grpc"
)

@@ -4,11 +4,11 @@
package grpc_middleware

import (
"context"
"fmt"
"testing"

"github.com/stretchr/testify/require"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
)
@@ -4,7 +4,8 @@
package grpc_logging

import (
"golang.org/x/net/context"
"context"

"google.golang.org/grpc"
"google.golang.org/grpc/codes"
)
@@ -4,11 +4,11 @@
package grpc_logrus

import (
"context"
"path"
"time"

"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -1,9 +1,10 @@
package grpc_logrus

import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)

// AddFields adds logrus fields to the logger.
@@ -1,9 +1,10 @@
package ctxlogrus

import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware/tags"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)

type ctxLoggerMarker struct{}
@@ -1,10 +1,11 @@
package ctxlogrus_test

import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus"
"github.com/grpc-ecosystem/go-grpc-middleware/tags"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)

var logrusLogger *logrus.Logger
@@ -1,6 +1,7 @@
package grpc_logrus_test

import (
"context"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware"
@@ -9,7 +10,6 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware/tags/logrus"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -1,9 +1,10 @@
package grpc_logrus

import (
"github.com/stretchr/testify/assert"
"testing"
"time"

"github.com/stretchr/testify/assert"
)

func TestDurationToTimeMillisField(t *testing.T) {
@@ -2,14 +2,14 @@ package grpc_logrus

import (
"bytes"
"context"
"fmt"

"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/go-grpc-middleware/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/tags/logrus"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -1,6 +1,7 @@
package grpc_logrus_test

import (
"context"
"io"
"io/ioutil"
"runtime"
@@ -15,7 +16,6 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -3,14 +3,14 @@
package grpc_logrus

import (
"context"
"path"
"time"

"github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus"
"github.com/grpc-ecosystem/go-grpc-middleware/tags/logrus"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -2,6 +2,7 @@ package grpc_logrus_test

import (
"bytes"
"context"
"encoding/json"
"io"
"testing"
@@ -12,7 +13,6 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware/testing"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc/codes"
)

@@ -4,12 +4,12 @@
package grpc_zap

import (
"context"
"path"
"time"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -1,10 +1,11 @@
package grpc_zap

import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/net/context"
)

// AddFields adds zap fields to the logger.
@@ -1,10 +1,11 @@
package ctxzap

import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware/tags"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/net/context"
)

type ctxMarker struct{}
@@ -1,11 +1,12 @@
package grpc_zap

import (
"github.com/stretchr/testify/assert"
"go.uber.org/zap/zapcore"
"math"
"testing"
"time"

"github.com/stretchr/testify/assert"
"go.uber.org/zap/zapcore"
)

func TestDurationToTimeMillisField(t *testing.T) {
@@ -2,6 +2,7 @@ package grpc_zap

import (
"bytes"
"context"
"fmt"

"github.com/golang/protobuf/jsonpb"
@@ -10,7 +11,6 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/ctxzap"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -1,22 +1,20 @@
package grpc_zap_test

import (
"context"
"io"
"runtime"
"testing"

"strings"
"testing"

"github.com/stretchr/testify/suite"
"google.golang.org/grpc"

"io"

"github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/tags"
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"

"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
"go.uber.org/zap"
@@ -1,6 +1,7 @@
package grpc_zap

import (
"context"
"path"
"time"

@@ -9,7 +10,6 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware/tags/zap"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

@@ -2,6 +2,7 @@ package grpc_zap_test

import (
"bytes"
"context"
"encoding/json"
"io"
"testing"
@@ -12,7 +13,6 @@ import (
pb_testproto "github.com/grpc-ecosystem/go-grpc-middleware/testing/testproto"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"golang.org/x/net/context"
)

var (
@@ -8,7 +8,8 @@ fmt:
go fmt $(GOFILES_NOVENDOR)

vet:
go vet $(GOFILES_NOVENDOR)
# do not check lostcancel, they are intentional.
go vet -lostcancel=false $(GOFILES_NOVENDOR)

test: vet
./scripts/test_all.sh
@@ -4,7 +4,8 @@
package grpc_recovery

import (
"golang.org/x/net/context"
"context"

"google.golang.org/grpc"
"google.golang.org/grpc/codes"
)

0 comments on commit e0797f4

Please sign in to comment.
You can’t perform that action at this time.