mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-10-08 08:21:12 +02:00
Initial open source release
This commit is contained in:
commit
11cf01f08e
488 files changed
+97180
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/oapi-codegen/nullable"
|
||||
)
|
||||
|
||||
// NullableToString converts a nullable stringer to a string
|
||||
func NullableToString[T fmt.Stringer](x nullable.Nullable[T]) string {
|
||||
if !x.IsSpecified() || x.IsNull() {
|
||||
return ""
|
||||
}
|
||||
return x.MustGet().String()
|
||||
}
|
||||
Reference in new issue
Block a user