- order manager added.

This commit is contained in:
gazebo
2018-08-21 17:18:08 +08:00
parent c29bcea27c
commit 643bcac0f8
18 changed files with 463 additions and 165 deletions

View File

@@ -179,3 +179,15 @@ func MapValue2Scope(value, fromMin, fromMax, toMin, toMax int64) int64 {
}
return int64(math.Round(float64(value-fromMin)/float64(fromMax-fromMin)*float64(toMax-toMin) + float64(toMin)))
}
func Errs2Str(sep string, errs ...error) (retVal string) {
if sep == "" {
sep = "\n"
}
for _, err := range errs {
if err != nil {
retVal += err.Error() + sep
}
}
return retVal
}