mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-18 04:57:57 +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
18 lines
404 B
Go
18 lines
404 B
Go
// Package iter provides a syntantically different way to iterate over integers. That's it.
|
|
package iter
|
|
|
|
// N returns a slice of n 0-sized elements, suitable for ranging over.
|
|
//
|
|
// For example:
|
|
//
|
|
// for i := range iter.N(10) {
|
|
// fmt.Println(i)
|
|
// }
|
|
//
|
|
// ... will print 0 to 9, inclusive.
|
|
//
|
|
// It does not cause any allocations.
|
|
func N(n int) []struct{} {
|
|
return make([]struct{}, n)
|
|
}
|