mirror of
https://github.com/shanghai-edu/multissh.git
synced 2025-12-14 12:27:47 +00:00
0.2.3
This commit is contained in:
parent
de1b1f2b59
commit
e704825aa9
5 changed files with 14 additions and 7 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
|||
*.txt
|
||||
*.json
|
||||
*.exe
|
||||
*.key
|
||||
*.key
|
||||
*.zip
|
||||
2
LICENSE
2
LICENSE
|
|
@ -187,7 +187,7 @@
|
|||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [2017] [shanghai-edu]
|
||||
Copyright [2017] [shanghai-edu & ECNU]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package funcs
|
|||
import (
|
||||
"bytes"
|
||||
// "os"
|
||||
//"strings"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
@ -16,7 +16,6 @@ const (
|
|||
key = "../server.key"
|
||||
)
|
||||
|
||||
/*
|
||||
func Test_SSH(t *testing.T) {
|
||||
var cipherList []string
|
||||
session, err := connect(username, password, ip, key, port, cipherList)
|
||||
|
|
@ -51,8 +50,8 @@ func Test_SSH(t *testing.T) {
|
|||
t.Log((outbt.String() + errbt.String()))
|
||||
return
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
func Test_SSH_run(t *testing.T) {
|
||||
var cipherList []string
|
||||
session, err := connect(username, password, ip, key, port, cipherList)
|
||||
|
|
@ -77,3 +76,4 @@ func Test_SSH_run(t *testing.T) {
|
|||
|
||||
return
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
6
g/cfg.go
6
g/cfg.go
|
|
@ -80,7 +80,11 @@ func GetJsonFile(filePath string) ([]SSHHost, error) {
|
|||
return result, err
|
||||
}
|
||||
var m HostJson
|
||||
json.Unmarshal(b, &m)
|
||||
err = json.Unmarshal(b, &m)
|
||||
if err != nil {
|
||||
log.Println("read file ", filePath, err)
|
||||
return result, err
|
||||
}
|
||||
result = m.SshHosts
|
||||
return result, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ package g
|
|||
// 0.2
|
||||
// 0.2.1
|
||||
// add write locate file
|
||||
// json Unmarshal with error
|
||||
// 0.2.3
|
||||
const (
|
||||
VERSION = "0.2.2"
|
||||
VERSION = "0.2.3"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue