mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 12:27:58 +08:00
refactoring
This commit is contained in:
@@ -29,3 +29,13 @@ func Retry(name string, job func() error) (err error) {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// return the first non empty string
|
||||
func Nvl(values ...string) string {
|
||||
for _, s := range values {
|
||||
if s != "" {
|
||||
return s
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user