version 0.2.2

add filelocate
This commit is contained in:
Feng_Qi 2018-04-09 10:06:45 +08:00
parent 360caeb82e
commit 82bd4c6577
3 changed files with 14 additions and 10 deletions

View file

@ -84,8 +84,8 @@ func GetJsonFile(filePath string) ([]SSHHost, error) {
result = m.SshHosts
return result, nil
}
func WriteIntoTxt(sshResult SSHResult) error {
outputFile, outputError := os.OpenFile(sshResult.Host+".txt", os.O_WRONLY|os.O_CREATE, 0666)
func WriteIntoTxt(sshResult SSHResult, locate string) error {
outputFile, outputError := os.OpenFile(locate+sshResult.Host+".txt", os.O_WRONLY|os.O_CREATE, 0666)
if outputError != nil {
return outputError
}

View file

@ -5,6 +5,7 @@ package g
// 0.1.2 fix ssh error on h3c switch
// 0.2
// 0.2.1
// add write locate file
const (
VERSION = "0.2.1"
VERSION = "0.2.2"
)