add go lint
This commit is contained in:
parent
8b0aa7a0db
commit
a14747bbd7
|
@ -7,10 +7,11 @@
|
||||||
package product
|
package product
|
||||||
|
|
||||||
import (
|
import (
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
|
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -8,6 +8,7 @@ package product
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
|
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
codes "google.golang.org/grpc/codes"
|
codes "google.golang.org/grpc/codes"
|
||||||
status "google.golang.org/grpc/status"
|
status "google.golang.org/grpc/status"
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/stores/cache"
|
"github.com/zeromicro/go-zero/core/stores/cache"
|
||||||
"github.com/zeromicro/go-zero/zrpc"
|
"github.com/zeromicro/go-zero/zrpc"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package categoryservicelogic
|
package categoryservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package categoryservicelogic
|
package categoryservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package categoryservicelogic
|
package categoryservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package kycservicelogic
|
package kycservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/kyc"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/kyc"
|
||||||
"context"
|
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package kycservicelogic
|
package kycservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package kycservicelogic
|
package kycservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package productitemservicelogic
|
package productitemservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/utils"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/utils"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
"code.30cm.net/digimon/library-go/errs"
|
"code.30cm.net/digimon/library-go/errs"
|
||||||
"context"
|
|
||||||
|
|
||||||
PB "code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
PB "code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package productitemservicelogic
|
package productitemservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/utils"
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/utils"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package productitemservicelogic
|
package productitemservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/utils"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/utils"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
"code.30cm.net/digimon/library-go/errs"
|
"code.30cm.net/digimon/library-go/errs"
|
||||||
"context"
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
PB "code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
PB "code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package productitemservicelogic
|
package productitemservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
domain "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
domain "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
"code.30cm.net/digimon/library-go/errs"
|
"code.30cm.net/digimon/library-go/errs"
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package productitemservicelogic
|
package productitemservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
||||||
"code.30cm.net/digimon/library-go/errs"
|
"code.30cm.net/digimon/library-go/errs"
|
||||||
"context"
|
|
||||||
|
|
||||||
PB "code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
PB "code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package tagservicelogic
|
package tagservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
||||||
domainProduct "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
domainProduct "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
||||||
"code.30cm.net/digimon/library-go/errs"
|
"code.30cm.net/digimon/library-go/errs"
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package tagservicelogic
|
package tagservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
||||||
domain "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
domain "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
"code.30cm.net/digimon/library-go/errs"
|
"code.30cm.net/digimon/library-go/errs"
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package tagservicelogic
|
package tagservicelogic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
domain "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
domain "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
"code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/usecase"
|
||||||
"code.30cm.net/digimon/library-go/errs"
|
"code.30cm.net/digimon/library-go/errs"
|
||||||
"context"
|
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/logic/category_service"
|
categoryservicelogic "code.30cm.net/digimon/app-cloudep-product-service/internal/logic/category_service"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/logic/kyc_service"
|
kycservicelogic "code.30cm.net/digimon/app-cloudep-product-service/internal/logic/kyc_service"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/logic/product_item_service"
|
productitemservicelogic "code.30cm.net/digimon/app-cloudep-product-service/internal/logic/product_item_service"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/logic/tag_service"
|
tagservicelogic "code.30cm.net/digimon/app-cloudep-product-service/internal/logic/tag_service"
|
||||||
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ const (
|
||||||
|
|
||||||
func (t *ItemType) ToString() string {
|
func (t *ItemType) ToString() string {
|
||||||
s, _ := ItemTypeToString(*t)
|
s, _ := ItemTypeToString(*t)
|
||||||
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,11 +39,13 @@ var stringToItemTypeMap = map[string]ItemType{
|
||||||
// ItemTypeToString 將 ItemType 轉換為字串
|
// ItemTypeToString 將 ItemType 轉換為字串
|
||||||
func ItemTypeToString(it ItemType) (string, bool) {
|
func ItemTypeToString(it ItemType) (string, bool) {
|
||||||
str, ok := itemTypeToStringMap[it]
|
str, ok := itemTypeToStringMap[it]
|
||||||
|
|
||||||
return str, ok
|
return str, ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// StringToItemType 將字串轉換為 ItemType
|
// StringToItemType 將字串轉換為 ItemType
|
||||||
func StringToItemType(str string) (ItemType, bool) {
|
func StringToItemType(str string) (ItemType, bool) {
|
||||||
it, ok := stringToItemTypeMap[str]
|
it, ok := stringToItemTypeMap[str]
|
||||||
|
|
||||||
return it, ok
|
return it, ok
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ const (
|
||||||
|
|
||||||
func (s *ShowType) ToString() string {
|
func (s *ShowType) ToString() string {
|
||||||
str, _ := ShowTypeToString(*s)
|
str, _ := ShowTypeToString(*s)
|
||||||
|
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,11 +27,13 @@ var stringToShowTypeMap = map[string]ShowType{
|
||||||
// ShowTypeToString 將 ShowType 轉換為字串
|
// ShowTypeToString 將 ShowType 轉換為字串
|
||||||
func ShowTypeToString(st ShowType) (string, bool) {
|
func ShowTypeToString(st ShowType) (string, bool) {
|
||||||
str, ok := showTypeToStringMap[st]
|
str, ok := showTypeToStringMap[st]
|
||||||
|
|
||||||
return str, ok
|
return str, ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// StringToShowType 將字串轉換為 ShowType
|
// StringToShowType 將字串轉換為 ShowType
|
||||||
func StringToShowType(str string) (ShowType, bool) {
|
func StringToShowType(str string) (ShowType, bool) {
|
||||||
st, ok := stringToShowTypeMap[str]
|
st, ok := stringToShowTypeMap[str]
|
||||||
|
|
||||||
return st, ok
|
return st, ok
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue