mirror of
https://github.com/ente-io/ente.git
synced 2025-05-29 05:51:19 +00:00
11 lines
184 B
Go
11 lines
184 B
Go
package string
|
|
|
|
// EmptyIfNil returns either the dereferenced string, or "" if the pointer is
|
|
// nil.
|
|
func EmptyIfNil(sp *string) string {
|
|
if sp == nil {
|
|
return ""
|
|
}
|
|
return *sp
|
|
}
|