mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-14 22:13:43 +08:00
模块化上传驱动,使用泛型优化工具库降低冗余
This commit is contained in:
@@ -28,21 +28,10 @@ type (
|
||||
)
|
||||
|
||||
var (
|
||||
localAuthClient IAuthClient
|
||||
localCronClient ICronClient
|
||||
localAuthClient IAuthClient
|
||||
)
|
||||
|
||||
func CronClient() ICronClient {
|
||||
if localCronClient == nil {
|
||||
panic("implement not found for interface ICronClient, forgot register?")
|
||||
}
|
||||
return localCronClient
|
||||
}
|
||||
|
||||
func RegisterCronClient(i ICronClient) {
|
||||
localCronClient = i
|
||||
}
|
||||
|
||||
func AuthClient() IAuthClient {
|
||||
if localAuthClient == nil {
|
||||
panic("implement not found for interface IAuthClient, forgot register?")
|
||||
@@ -53,3 +42,14 @@ func AuthClient() IAuthClient {
|
||||
func RegisterAuthClient(i IAuthClient) {
|
||||
localAuthClient = i
|
||||
}
|
||||
|
||||
func CronClient() ICronClient {
|
||||
if localCronClient == nil {
|
||||
panic("implement not found for interface ICronClient, forgot register?")
|
||||
}
|
||||
return localCronClient
|
||||
}
|
||||
|
||||
func RegisterCronClient(i ICronClient) {
|
||||
localCronClient = i
|
||||
}
|
||||
|
Reference in New Issue
Block a user