sing-box/adapter/prestart.go
2023-03-18 20:27:38 +08:00

16 lines
234 B
Go

package adapter
type PreStarter interface {
PreStart() error
}
func PreStart(starter any) error {
if preService, ok := starter.(PreStarter); ok {
err := preService.PreStart()
if err != nil {
return err
}
}
return nil
}