23 lines
384 B
Go
23 lines
384 B
Go
package module
|
|
|
|
import (
|
|
"git.hlsq.asia/mmorpg/service-common/config"
|
|
"git.hlsq.asia/mmorpg/service-common/log"
|
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
|
"math/rand"
|
|
)
|
|
|
|
// Base 基础模块
|
|
type Base struct {
|
|
DefaultModule
|
|
Log *config.LogConfig
|
|
}
|
|
|
|
func (m *Base) Init() error {
|
|
// 日志
|
|
log.Init(m.Log)
|
|
// 雪花
|
|
utils.InitSnowflake(int64(rand.Intn(1000)))
|
|
return nil
|
|
}
|