mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-25 10:27:35 +08:00
Conflicts: Gopkg.lock pkg/appsrv/appsrv.go pkg/cloudcommon/options.go pkg/compute/models/hosts.go pkg/compute/models/quotas.go pkg/compute/service/service.go pkg/mcclient/mcclient.go
8 lines
197 B
Go
8 lines
197 B
Go
package missinggo
|
|
|
|
// Sets an upper bound on the len of b. max can be any type that will cast to
|
|
// int64.
|
|
func LimitLen(b []byte, max ...interface{}) []byte {
|
|
return b[:MinInt(len(b), max...)]
|
|
}
|