- 重构createWaybillOn3rdProviders
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user