sing-box/adapter/prestart.go

16 lines
234 B
Go
Raw Permalink Normal View History

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