getConfigField retrieves a config field value by name
(cfg *HostConfig, key string)
| 201 | |
| 202 | // getConfigField retrieves a config field value by name |
| 203 | func getConfigField(cfg *HostConfig, key string) string { |
| 204 | switch key { |
| 205 | case "ServerAliveInterval": |
| 206 | return cfg.ServerAliveInterval |
| 207 | case "ServerAliveCountMax": |
| 208 | return cfg.ServerAliveCountMax |
| 209 | case "ForwardAgent": |
| 210 | return cfg.ForwardAgent |
| 211 | case "IdentityAgent": |
| 212 | return cfg.IdentityAgent |
| 213 | case "AddKeysToAgent": |
| 214 | return cfg.AddKeysToAgent |
| 215 | case "UseKeychain": |
| 216 | return cfg.UseKeychain |
| 217 | case "PubkeyAcceptedAlgorithms": |
| 218 | return cfg.PubkeyAcceptedAlgorithms |
| 219 | case "StrictHostKeyChecking": |
| 220 | return cfg.StrictHostKeyChecking |
| 221 | case "UserKnownHostsFile": |
| 222 | return cfg.UserKnownHostsFile |
| 223 | case "Compression": |
| 224 | return cfg.Compression |
| 225 | case "TCPKeepAlive": |
| 226 | return cfg.TCPKeepAlive |
| 227 | default: |
| 228 | return "" |
| 229 | } |
| 230 | } |
nothing calls this directly
no outgoing calls
no test coverage detected