(hostname, username string, tokenSource tokenSource)
| 194 | } |
| 195 | |
| 196 | func migrateToken(hostname, username string, tokenSource tokenSource) error { |
| 197 | // If token is not currently stored in the keyring do not migrate it, |
| 198 | // as it is being stored in the config and is being handled when migrating the config. |
| 199 | if !tokenSource.inKeyring { |
| 200 | return nil |
| 201 | } |
| 202 | return keyring.Set(keyringServiceName(hostname), username, tokenSource.token) |
| 203 | } |
| 204 | |
| 205 | func migrateConfig(c *config.Config, hostname, username string) error { |
| 206 | // Set the user key in case it was previously an anonymous user. |
no test coverage detected