- 重构createWaybillOn3rdProviders

This commit is contained in:
gazebo
2019-03-30 17:11:23 +08:00
parent 10a444c895
commit 96fb2d9535
11 changed files with 127 additions and 100 deletions

View File

@@ -311,3 +311,12 @@ func AddVendorInfo2Err(inErr error, vendorID int) (outErr error) {
}
return outErr
}
func LimitStringLen(str string, maxLen int) (limitedStr string) {
if maxLen > 0 {
if strLen := len(str); strLen > maxLen {
str = str[:maxLen]
}
}
return str
}