mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
refactor: move eventmanager to common package
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -607,3 +607,10 @@ func GetTLSVersion(val int) uint16 {
|
||||
func IsEmailValid(email string) bool {
|
||||
return emailRegex.MatchString(email)
|
||||
}
|
||||
|
||||
// PanicOnError calls panic if err is not nil
|
||||
func PanicOnError(err error) {
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("unexpected error: %w", err))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user