refactoring

This commit is contained in:
Chris Lu
2020-11-15 16:58:48 -08:00
parent 500bcab953
commit 95c0de285d
12 changed files with 242 additions and 256 deletions

View File

@@ -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 ""
}