()
| 192 | return fmt.Sprintf("%s:%d", host.Hostname(), host.Port()) |
| 193 | } |
| 194 | func (host *Host) String() string { |
| 195 | if host.URL != "" { |
| 196 | return host.URL |
| 197 | } else if host.Addr != "" { // to be removed in a future version in favor of URL |
| 198 | if host.Password != "" { |
| 199 | return fmt.Sprintf("ssh://%s:%s@%s", host.User, strings.Repeat("*", 4), host.Addr) |
| 200 | } |
| 201 | return fmt.Sprintf("ssh://%s@%s", host.User, host.Addr) |
| 202 | } |
| 203 | return "" |
| 204 | } |
| 205 | func (host *Host) Scheme() BastionScheme { |
| 206 | if host.URL != "" { |
| 207 | u, err := url.Parse(host.URL) |
no outgoing calls
no test coverage detected