update package reference

This commit is contained in:
kevin
2020-08-08 16:40:10 +08:00
parent d19d25c72f
commit 0a7e0cce77
377 changed files with 881 additions and 1423 deletions

View File

@@ -3,8 +3,8 @@ package main
import (
"fmt"
"zero/core/bloom"
"zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/bloom"
"github.com/tal-tech/go-zero/core/stores/redis"
)
func main() {

View File

@@ -8,8 +8,8 @@ import (
"sync/atomic"
"time"
"zero/core/breaker"
"zero/core/lang"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/lang"
"gopkg.in/cheggaaa/pb.v1"
)

View File

@@ -3,8 +3,8 @@ package main
import (
"time"
"zero/core/conf"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/core/logx"
)
type TimeHolder struct {

View File

@@ -6,10 +6,10 @@ import (
"strings"
"time"
"zero/core/discov"
"zero/core/logx"
"zero/core/proc"
"zero/core/syncx"
"github.com/tal-tech/go-zero/core/discov"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/proc"
"github.com/tal-tech/go-zero/core/syncx"
"go.etcd.io/etcd/clientv3"
)

View File

@@ -6,7 +6,7 @@ import (
"log"
"time"
"zero/core/discov"
"github.com/tal-tech/go-zero/core/discov"
)
var value = flag.String("v", "value", "the value")

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"time"
"zero/core/discov"
"zero/core/lang"
"github.com/tal-tech/go-zero/core/discov"
"github.com/tal-tech/go-zero/core/lang"
)
func main() {

View File

@@ -12,9 +12,9 @@ import (
"strings"
"time"
"zero/core/filex"
"zero/core/fx"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/filex"
"github.com/tal-tech/go-zero/core/fx"
"github.com/tal-tech/go-zero/core/logx"
"gopkg.in/cheggaaa/pb.v1"
)

View File

@@ -3,7 +3,7 @@ package main
import (
"testing"
"zero/core/fx"
"github.com/tal-tech/go-zero/core/fx"
)
func BenchmarkFx(b *testing.B) {

View File

@@ -3,7 +3,7 @@ package main
import (
"fmt"
"zero/core/fx"
"github.com/tal-tech/go-zero/core/fx"
)
func main() {

View File

@@ -1,8 +1,8 @@
package config
import (
"zero/rest"
"zero/rpcx"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rpcx"
)
type Config struct {

View File

@@ -3,12 +3,12 @@ package main
import (
"flag"
"zero/core/conf"
"zero/example/graceful/dns/api/config"
"zero/example/graceful/dns/api/handler"
"zero/example/graceful/dns/api/svc"
"zero/rest"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/graceful/dns/api/config"
"github.com/tal-tech/go-zero/example/graceful/dns/api/handler"
"github.com/tal-tech/go-zero/example/graceful/dns/api/svc"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rpcx"
)
var configFile = flag.String("f", "etc/graceful-api.json", "the config file")

View File

@@ -7,12 +7,12 @@ import (
"os"
"time"
"zero/core/executors"
"zero/core/logx"
"zero/example/graceful/dns/api/svc"
"zero/example/graceful/dns/api/types"
"zero/example/graceful/dns/rpc/graceful"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/core/executors"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/example/graceful/dns/api/svc"
"github.com/tal-tech/go-zero/example/graceful/dns/api/types"
"github.com/tal-tech/go-zero/example/graceful/dns/rpc/graceful"
"github.com/tal-tech/go-zero/rest/httpx"
)
func gracefulHandler(ctx *svc.ServiceContext) http.HandlerFunc {

View File

@@ -4,8 +4,8 @@ package handler
import (
"net/http"
"zero/example/graceful/dns/api/svc"
"zero/rest"
"github.com/tal-tech/go-zero/example/graceful/dns/api/svc"
"github.com/tal-tech/go-zero/rest"
)
func RegisterHandlers(engine *rest.Server, ctx *svc.ServiceContext) {

View File

@@ -1,6 +1,6 @@
package svc
import "zero/rpcx"
import "github.com/tal-tech/go-zero/rpcx"
type ServiceContext struct {
Client *rpcx.RpcClient

View File

@@ -14,13 +14,13 @@ It has these top-level messages:
*/
package graceful
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
"fmt"
"math"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -7,9 +7,9 @@ import (
"os"
"time"
"zero/core/conf"
"zero/example/graceful/dns/rpc/graceful"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/graceful/dns/rpc/graceful"
"github.com/tal-tech/go-zero/rpcx"
"google.golang.org/grpc"
)

View File

@@ -1,8 +1,8 @@
package config
import (
"zero/rest"
"zero/rpcx"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rpcx"
)
type Config struct {

View File

@@ -3,12 +3,12 @@ package main
import (
"flag"
"zero/core/conf"
"zero/example/graceful/etcd/api/config"
"zero/example/graceful/etcd/api/handler"
"zero/example/graceful/etcd/api/svc"
"zero/rest"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/graceful/etcd/api/config"
"github.com/tal-tech/go-zero/example/graceful/etcd/api/handler"
"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rpcx"
)
var configFile = flag.String("f", "etc/graceful-api.json", "the config file")

View File

@@ -7,12 +7,12 @@ import (
"os"
"time"
"zero/core/executors"
"zero/core/logx"
"zero/example/graceful/etcd/api/svc"
"zero/example/graceful/etcd/api/types"
"zero/example/graceful/etcd/rpc/graceful"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/core/executors"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
"github.com/tal-tech/go-zero/example/graceful/etcd/api/types"
"github.com/tal-tech/go-zero/example/graceful/etcd/rpc/graceful"
"github.com/tal-tech/go-zero/rest/httpx"
)
func gracefulHandler(ctx *svc.ServiceContext) http.HandlerFunc {

View File

@@ -4,8 +4,8 @@ package handler
import (
"net/http"
"zero/example/graceful/etcd/api/svc"
"zero/rest"
"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
"github.com/tal-tech/go-zero/rest"
)
func RegisterHandlers(engine *rest.Server, ctx *svc.ServiceContext) {

View File

@@ -1,6 +1,6 @@
package svc
import "zero/rpcx"
import "github.com/tal-tech/go-zero/rpcx"
type ServiceContext struct {
Client *rpcx.RpcClient

View File

@@ -14,13 +14,13 @@ It has these top-level messages:
*/
package graceful
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
"fmt"
"math"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -7,9 +7,9 @@ import (
"os"
"time"
"zero/core/conf"
"zero/example/graceful/etcd/rpc/graceful"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/graceful/etcd/rpc/graceful"
"github.com/tal-tech/go-zero/rpcx"
"google.golang.org/grpc"
)

View File

@@ -8,8 +8,8 @@ import (
"sync"
"time"
"zero/core/lang"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/threading"
"gopkg.in/cheggaaa/pb.v1"
)

View File

@@ -5,11 +5,11 @@ import (
"runtime"
"time"
"zero/core/logx"
"zero/core/service"
"zero/core/stat"
"zero/core/syncx"
"zero/rest"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/rest"
)
func main() {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"log"
"zero/core/codec"
"github.com/tal-tech/go-zero/core/codec"
)
const (

View File

@@ -4,10 +4,10 @@ import (
"flag"
"net/http"
"zero/core/logx"
"zero/core/service"
"zero/rest"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rest/httpx"
)
var (

View File

@@ -5,10 +5,10 @@ import (
"fmt"
"net/http"
"zero/core/logx"
"zero/core/service"
"zero/rest"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rest/httpx"
)
var (

View File

@@ -6,10 +6,10 @@ import (
"net/http"
"time"
"zero/core/logx"
"zero/core/service"
"zero/rest"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rest/httpx"
)
var (

View File

@@ -15,7 +15,7 @@ import (
"strings"
"time"
"zero/core/codec"
"github.com/tal-tech/go-zero/core/codec"
)
const pubKey = `-----BEGIN PUBLIC KEY-----

View File

@@ -5,10 +5,10 @@ import (
"io"
"net/http"
"zero/core/logx"
"zero/core/service"
"zero/rest"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rest/httpx"
)
var keyPem = flag.String("prikey", "private.pem", "the private key file")

View File

@@ -8,9 +8,9 @@ import (
"strings"
"time"
"zero/core/conf"
"zero/rest"
"zero/rest/httpx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rest/httpx"
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request"

View File

@@ -10,8 +10,8 @@ import (
"sync/atomic"
"time"
"zero/core/limit"
"zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/limit"
"github.com/tal-tech/go-zero/core/stores/redis"
)
const seconds = 5

View File

@@ -8,8 +8,8 @@ import (
"sync/atomic"
"time"
"zero/core/limit"
"zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/limit"
"github.com/tal-tech/go-zero/core/stores/redis"
)
const (

View File

@@ -11,10 +11,10 @@ import (
"sync/atomic"
"time"
"zero/core/collection"
"zero/core/executors"
"zero/core/lang"
"zero/core/syncx"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/executors"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/syncx"
"gopkg.in/cheggaaa/pb.v1"
)

View File

@@ -10,8 +10,8 @@ import (
"sync/atomic"
"time"
"zero/core/fx"
"zero/core/lang"
"github.com/tal-tech/go-zero/core/fx"
"github.com/tal-tech/go-zero/core/lang"
)
var (

View File

@@ -1,6 +1,6 @@
package main
import _ "zero/core/stat"
import _ "github.com/tal-tech/go-zero/core/stat"
func main() {
select {}

View File

@@ -6,11 +6,11 @@ import (
"runtime"
"time"
"zero/core/fx"
"zero/core/logx"
"zero/core/service"
"zero/core/stat"
"zero/rest"
"github.com/tal-tech/go-zero/core/fx"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/rest"
)
const duration = time.Millisecond

View File

@@ -3,7 +3,7 @@ package main
import (
"time"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
func foo() {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"time"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
func main() {

View File

@@ -14,7 +14,7 @@ import (
"sync/atomic"
"time"
"zero/core/mr"
"github.com/tal-tech/go-zero/core/mr"
"github.com/google/gops/agent"
)

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"time"
"zero/core/mr"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/mr"
"github.com/tal-tech/go-zero/core/timex"
)
func main() {

View File

@@ -3,7 +3,7 @@ package main
import (
"fmt"
"zero/core/mr"
"github.com/tal-tech/go-zero/core/mr"
)
var (

View File

@@ -8,10 +8,10 @@ import (
"runtime/pprof"
"time"
"zero/core/lang"
"zero/core/logx"
"zero/core/mr"
"zero/core/proc"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/mr"
"github.com/tal-tech/go-zero/core/proc"
)
func dumpGoroutines() {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"time"
"zero/core/mr"
"github.com/tal-tech/go-zero/core/mr"
)
func main() {

View File

@@ -5,7 +5,7 @@ import (
"log"
"time"
"zero/core/stores/mongo"
"github.com/tal-tech/go-zero/core/stores/mongo"
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"

View File

@@ -3,7 +3,7 @@ package main
import (
"time"
"zero/core/executors"
"github.com/tal-tech/go-zero/core/executors"
)
func main() {

View File

@@ -8,8 +8,8 @@ import (
"sync/atomic"
"time"
"zero/core/lang"
"zero/core/syncx"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/syncx"
)
func main() {

View File

@@ -6,9 +6,9 @@ import (
"fmt"
"time"
"zero/core/discov"
"zero/example/rpc/remote/unary"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/discov"
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
"github.com/tal-tech/go-zero/rpcx"
)
const timeFormat = "15:04:05"

View File

@@ -5,9 +5,9 @@ import (
"fmt"
"time"
"zero/core/discov"
"zero/example/rpc/remote/unary"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/discov"
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
"github.com/tal-tech/go-zero/rpcx"
)
func main() {

View File

@@ -6,9 +6,9 @@ import (
"fmt"
"log"
"zero/core/discov"
"zero/example/rpc/remote/stream"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/discov"
"github.com/tal-tech/go-zero/example/rpc/remote/stream"
"github.com/tal-tech/go-zero/rpcx"
)
const name = "kevin"

View File

@@ -6,9 +6,9 @@ import (
"fmt"
"time"
"zero/core/conf"
"zero/example/rpc/remote/unary"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
"github.com/tal-tech/go-zero/rpcx"
)
var configFile = flag.String("f", "config.json", "the config file")

View File

@@ -4,10 +4,10 @@ import (
"context"
"flag"
"zero/core/logx"
"zero/core/service"
"zero/example/rpc/remote/unary"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
"github.com/tal-tech/go-zero/rpcx"
"google.golang.org/grpc"
)

View File

@@ -14,13 +14,13 @@ It has these top-level messages:
*/
package stream
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
"fmt"
"math"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -14,13 +14,13 @@ It has these top-level messages:
*/
package unary
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
"fmt"
"math"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -4,9 +4,9 @@ import (
"fmt"
"io"
"zero/core/conf"
"zero/example/rpc/remote/stream"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/rpc/remote/stream"
"github.com/tal-tech/go-zero/rpcx"
"google.golang.org/grpc"
)

View File

@@ -8,9 +8,9 @@ import (
"sync"
"time"
"zero/core/conf"
"zero/example/rpc/remote/unary"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/rpc/remote/unary"
"github.com/tal-tech/go-zero/rpcx"
"google.golang.org/grpc"
)

View File

@@ -9,8 +9,8 @@ import (
"syscall"
"time"
"zero/core/cmdline"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/cmdline"
"github.com/tal-tech/go-zero/core/logx"
)
const (

View File

@@ -5,7 +5,7 @@ import (
"runtime"
"time"
"zero/core/stat"
"github.com/tal-tech/go-zero/core/stat"
)
func main() {

View File

@@ -8,9 +8,9 @@ import (
"strconv"
"time"
"zero/core/cmdline"
"zero/core/collection"
"zero/core/proc"
"github.com/tal-tech/go-zero/core/cmdline"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/proc"
)
const numItems = 1000000

View File

@@ -8,7 +8,7 @@ import (
"sync/atomic"
"time"
"zero/core/collection"
"github.com/tal-tech/go-zero/core/collection"
)
const interval = time.Minute

View File

@@ -4,13 +4,13 @@ import (
"flag"
"net/http"
"zero/core/conf"
"zero/core/logx"
"zero/core/service"
"zero/example/tracing/remote/portal"
"zero/rest"
"zero/rest/httpx"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/service"
"github.com/tal-tech/go-zero/example/tracing/remote/portal"
"github.com/tal-tech/go-zero/rest"
"github.com/tal-tech/go-zero/rest/httpx"
"github.com/tal-tech/go-zero/rpcx"
)
var (

View File

@@ -4,10 +4,10 @@ import (
"context"
"flag"
"zero/core/conf"
"zero/example/tracing/remote/portal"
"zero/example/tracing/remote/user"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/tracing/remote/portal"
"github.com/tal-tech/go-zero/example/tracing/remote/user"
"github.com/tal-tech/go-zero/rpcx"
"google.golang.org/grpc"
)

View File

@@ -14,13 +14,13 @@ It has these top-level messages:
*/
package portal
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
"fmt"
"math"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -14,13 +14,13 @@ It has these top-level messages:
*/
package user
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
"fmt"
"math"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -8,9 +8,9 @@ import (
"sync"
"time"
"zero/core/conf"
"zero/example/tracing/remote/user"
"zero/rpcx"
"github.com/tal-tech/go-zero/core/conf"
"github.com/tal-tech/go-zero/example/tracing/remote/user"
"github.com/tal-tech/go-zero/rpcx"
"google.golang.org/grpc"
)