mirror of
https://github.com/shanghai-edu/multissh.git
synced 2025-12-16 21:37:50 +00:00
0.2.1-version
This commit is contained in:
parent
87e207932f
commit
378c12a285
3 changed files with 29 additions and 5 deletions
16
g/cfg.go
16
g/cfg.go
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue