mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: Add more dbgen functions (#6005)
This commit is contained in:
@ -1,5 +1,13 @@
|
||||
package dbgen
|
||||
|
||||
import "net"
|
||||
|
||||
func takeFirstIP(values ...net.IPNet) net.IPNet {
|
||||
return takeFirstF(values, func(v net.IPNet) bool {
|
||||
return len(v.IP) != 0 && len(v.Mask) != 0
|
||||
})
|
||||
}
|
||||
|
||||
// takeFirstBytes implements takeFirst for []byte.
|
||||
// []byte is not a comparable type.
|
||||
func takeFirstBytes(values ...[]byte) []byte {
|
||||
|
Reference in New Issue
Block a user