Пример #1
0
func intRangeLine(network ipaddr.Prefix, orig []string) []string {
	startInt := new(big.Int)
	startInt.SetBytes(network.Addr())

	endInt := new(big.Int)
	endInt.SetBytes(network.LastAddr())

	return append(
		[]string{startInt.String(), endInt.String()},
		orig...,
	)
}
Пример #2
0
func rangeLine(network ipaddr.Prefix, orig []string) []string {
	return append(
		[]string{network.Addr().String(), network.LastAddr().String()},
		orig...,
	)
}