0.2.1-version

This commit is contained in:
Feng_Qi 2018-01-20 10:53:42 +08:00
parent 87e207932f
commit 378c12a285
3 changed files with 29 additions and 5 deletions

View file

@ -100,7 +100,21 @@ func WriteIntoTxt(sshResult SSHResult) error {
return nil
}
func GetIpList(filePath string) ([]string, error) {
func GetIpList(ipString string) ([]string, error) {
res := SplitString(ipString)
var allIp []string
if len(res) > 0 {
for _, sip := range res {
aip := ParseIp(sip)
for _, ip := range aip {
allIp = append(allIp, ip)
}
}
}
return allIp, nil
}
func GetIpListFromFile(filePath string) ([]string, error) {
res, err := Getfile(filePath)
if err != nil {
return nil, nil

View file

@ -4,6 +4,7 @@ package g
// 0.1 fisrt version
// 0.1.2 fix ssh error on h3c switch
// 0.2
// 0.2.1
const (
VERSION = "0.2"
VERSION = "0.2.1"
)