(hostname, username string, tokenSource tokenSource)
| 186 | } |
| 187 | |
| 188 | func migrateToken(hostname, username string, tokenSource tokenSource) error { |
| 189 | // If token is not currently stored in the keyring do not migrate it, |
| 190 | // as it is being stored in the config and is being handled when migrating the config. |
| 191 | if !tokenSource.inKeyring { |
| 192 | return nil |
| 193 | } |
| 194 | return keyring.Set(keyringServiceName(hostname), username, tokenSource.token) |
| 195 | } |
| 196 | |
| 197 | func migrateConfig(c *config.Config, hostname, username string) error { |
| 198 | // Set the user key in case it was previously an anonymous user. |
no test coverage detected