Skip to content

Commit

Permalink
style:修改包名
Browse files Browse the repository at this point in the history
  • Loading branch information
goodsfinder committed Oct 12, 2023
1 parent 71e9159 commit 5fb4f9e
Show file tree
Hide file tree
Showing 24 changed files with 41 additions and 722 deletions.
2 changes: 1 addition & 1 deletion client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/richkeyu/gocommons/config"
"github.com/goodsfinder/common/config"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"time"

"github.com/richkeyu/gocommons/plog"
"github.com/goodsfinder/common/plog"

"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion client/resp.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package client

import "github.com/richkeyu/gocommons/perrors"
import "github.com/goodsfinder/common/perrors"

const (
SuccessCode = 1
Expand Down
2 changes: 1 addition & 1 deletion db/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"gorm.io/gorm/utils"

"github.com/richkeyu/gocommons/plog"
"github.com/goodsfinder/common/plog"

"gorm.io/driver/mysql"
"gorm.io/gorm"
Expand Down
2 changes: 1 addition & 1 deletion db/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/richkeyu/gocommons/plog"
"github.com/goodsfinder/common/plog"
)

func TestConn(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dispatch/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync/atomic"
"syscall"

"github.com/richkeyu/gocommons/plog"
"github.com/goodsfinder/common/plog"
)

var exitHandlers []func()
Expand Down
26 changes: 4 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module github.com/richkeyu/gocommons
module github.com/goodsfinder/common

go 1.21
go 1.20

require (
cloud.google.com/go/pubsub v1.25.1
github.com/fsnotify/fsnotify v1.6.0
github.com/getsentry/sentry-go v0.17.0
github.com/gin-gonic/gin v1.9.1
Expand All @@ -14,56 +13,39 @@ require (
github.com/ip2location/ip2location-go/v9 v9.5.0
github.com/json-iterator/go v1.1.12
github.com/sirupsen/logrus v1.9.0
github.com/urfave/cli/v2 v2.16.3
google.golang.org/api v0.95.0
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/yaml.v2 v2.4.0
gorm.io/driver/mysql v1.3.6
gorm.io/gorm v1.23.8
)

require (
cloud.google.com/go v0.104.0 // indirect
cloud.google.com/go/compute v1.9.0 // indirect
cloud.google.com/go/iam v0.4.0 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.5.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
golang.org/x/sync v0.0.0-20220907140024-f12130a52804 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220909194730-69f6226f97e5 // indirect
google.golang.org/grpc v1.49.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
667 changes: 0 additions & 667 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions ip/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"sync"
"time"

"github.com/richkeyu/gocommons/plog"
"github.com/richkeyu/gocommons/server"
"github.com/richkeyu/gocommons/util"
"github.com/goodsfinder/common/plog"
"github.com/goodsfinder/common/server"
"github.com/goodsfinder/common/util"

"github.com/gin-gonic/gin"
"github.com/ip2location/ip2location-go/v9"
Expand Down
4 changes: 2 additions & 2 deletions middleware/gin_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"time"

"github.com/richkeyu/gocommons/plog"
"github.com/richkeyu/gocommons/server"
"github.com/goodsfinder/common/plog"
"github.com/goodsfinder/common/server"

"github.com/gin-gonic/gin"
)
Expand Down
2 changes: 1 addition & 1 deletion middleware/gin_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/richkeyu/gocommons/plog"
"github.com/gin-gonic/gin"
"github.com/goodsfinder/common/plog"
)

func Recovery() gin.HandlerFunc {
Expand Down
2 changes: 1 addition & 1 deletion middleware/gin_trace.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package middleware

import (
"github.com/richkeyu/gocommons/trace"
"github.com/gin-gonic/gin"
"github.com/goodsfinder/common/trace"
)

// InitTrace http请求初始化traceID
Expand Down
4 changes: 2 additions & 2 deletions plog/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/richkeyu/gocommons/trace"
"github.com/richkeyu/gocommons/util"
"github.com/goodsfinder/common/trace"
"github.com/goodsfinder/common/util"

"github.com/sirupsen/logrus"
)
Expand Down
5 changes: 3 additions & 2 deletions plog/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package plog

import (
"context"
"github.com/richkeyu/gocommons/server"
"github.com/gin-gonic/gin"
"testing"
"time"

"github.com/gin-gonic/gin"
"github.com/goodsfinder/common/server"
)

func TestLog(t *testing.T) {
Expand Down
7 changes: 4 additions & 3 deletions plog/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ package plog

import (
"context"
"github.com/richkeyu/gocommons/server"
"github.com/richkeyu/gocommons/trace"
"github.com/gin-gonic/gin"
"time"

"github.com/gin-gonic/gin"
"github.com/goodsfinder/common/server"
"github.com/goodsfinder/common/trace"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions redis/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package redis

import (
"context"
"github.com/richkeyu/gocommons/plog"
"github.com/go-redis/redis/v8"
"sync"
"time"

"github.com/go-redis/redis/v8"
"github.com/goodsfinder/common/plog"
)

type Client struct {
Expand Down
2 changes: 1 addition & 1 deletion redis/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/richkeyu/gocommons/plog"
"github.com/goodsfinder/common/plog"

"github.com/go-redis/redis/v8"
)
Expand Down
2 changes: 1 addition & 1 deletion sentry/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"time"

"github.com/richkeyu/gocommons/config"
"github.com/getsentry/sentry-go"
"github.com/goodsfinder/common/config"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os/signal"
"time"

"github.com/richkeyu/gocommons/config"
"github.com/goodsfinder/common/config"

"github.com/gin-gonic/gin"
)
Expand Down
2 changes: 1 addition & 1 deletion trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/richkeyu/gocommons/server"
"github.com/goodsfinder/common/server"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions util/app/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net/http"
"time"

"github.com/richkeyu/gocommons/perrors"
"github.com/richkeyu/gocommons/plog"
"github.com/goodsfinder/common/perrors"
"github.com/goodsfinder/common/plog"

"github.com/gin-gonic/gin"
"github.com/go-playground/validator/v10"
Expand Down
2 changes: 1 addition & 1 deletion util/app/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"strings"

"github.com/richkeyu/gocommons/util"
"github.com/goodsfinder/common/util"
)

const OmitRequiredFlag = "OmitRequired"
Expand Down
3 changes: 2 additions & 1 deletion util/app/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package app

import (
"fmt"
"github.com/richkeyu/gocommons/util/assert"
"testing"

"github.com/goodsfinder/common/util/assert"
)

type FormReq struct {
Expand Down
6 changes: 3 additions & 3 deletions wrapper/http_client_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package wrapper
import (
"context"

"github.com/richkeyu/gocommons/client"
"github.com/richkeyu/gocommons/server"
"github.com/richkeyu/gocommons/trace"
"github.com/goodsfinder/common/client"
"github.com/goodsfinder/common/server"
"github.com/goodsfinder/common/trace"
)

func HttpClientTrace(next client.Wrapper) client.Wrapper {
Expand Down

0 comments on commit 5fb4f9e

Please sign in to comment.