Add method that returns if bookmark's ssh is empty

We will use this method in upcoming commit to create
client from stored bookmark.
This commit is contained in:
akarki15
2016-11-10 01:21:49 -05:00
parent 474c439076
commit f4fb5744ef
2 changed files with 23 additions and 0 deletions

View File

@@ -23,6 +23,9 @@ type Bookmark struct {
Ssh shared.SSHInfo `json:"ssh"` // SSH tunnel config
}
func (b Bookmark) SSHInfoIsEmpty() bool {
return b.Ssh.User == "" && b.Ssh.Host == "" && b.Ssh.Port == ""
}
func readServerConfig(path string) (Bookmark, error) {
bookmark := Bookmark{}