sing-box/adapter/prestart.go

16 lines
234 B
Go
Raw Permalink Normal View History

2023-03-18 20:26:58 +08:00
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
}