-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move , and logic into their cobra commands. For engine and proxy pack…
…ages, move functions into utils_ file.
- Loading branch information
Sandeep Jadoonanan
committed
Oct 10, 2017
1 parent
2c832be
commit 38f818a
Showing
10 changed files
with
103 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package engine | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"github.com/exitshell/konnect/proxy" | ||
) | ||
|
||
// New - Create a new Konnect object. | ||
func New() *Konnect { | ||
return &Konnect{ | ||
Hosts: make(map[string]*proxy.SSHProxy), | ||
ProxyChan: make(chan bool), | ||
CompletedChan: make(chan bool), | ||
} | ||
} | ||
|
||
// Init - Create a new Konnect object. | ||
func Init(filename string) (*Konnect, error) { | ||
filename, err := filepath.Abs(filename) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
konnect := New() | ||
if err = konnect.LoadFromFile(filename); err != nil { | ||
return nil, err | ||
} | ||
|
||
return konnect, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters