diff --git a/app.go b/app.go index 7958a85..657c949 100644 --- a/app.go +++ b/app.go @@ -37,6 +37,7 @@ type App interface { user string, passwd string, dataBase string) GetOrmDb(string) *gorm.DB RegisterCaHandle(c string, a string, handle GinHandlerFunc) + GetPid() int } type UserApp interface { @@ -372,6 +373,10 @@ func (this *app) getCaHandle(handleName string) GinHandlerFunc { } } +func (this *app) GetPid() int { + return os.Getpid() +} + func parseArgs() (int, int) { args := os.Args[1:] if len(args) <= 0 {