some improvements
This commit is contained in:
parent
501d579a90
commit
d6c9b69b9c
3 changed files with 24 additions and 3 deletions
|
|
@ -6,6 +6,15 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
type IPConfigs []*IPConfig
|
||||
|
||||
func (c IPConfigs) Get(index int) *IPConfig {
|
||||
if len(c)-1 >= index {
|
||||
return c[index]
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type IPConfig struct {
|
||||
IPv4CIDR string
|
||||
IPv4Gateway string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue