Refactor addLoginMain() #201
Merged
6543
merged 10 commits from noerw/tea:refactor-loginMain
into master
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'noerw/tea:refactor-loginMain'
Deleting a branch is permanent. It CANNOT be undone. Continue?
As discussed in #186, we might also want to change the login-name generation from camelcase to the plain login hostname.
I find the latter much more readable and intuitive
Refactor Loginmainto Refactor addLoginMain() 2 years ago}
}
t, _, err := client.CreateAccessToken(gitea.CreateAccessTokenOption{Name: tokenName})
if token == "" {
blocked by #206
@noerw time to "resolve" conflicts
I think you can split away the token generation out of addLogin into "tasks" package (not in repo jet, but proposed by #184)
...for readability. 🔥 opinionated commit
f0d628f367
toe78f4e1645
2 years ago@6543 done.
I left token generation in the config package, as it seems reasonable to have it as a member method operating on
Login
}
// NormalizeURL normalizes the input with a protocol
func NormalizeURL(raw string, insecure bool) (*url.URL, error) {
insecure mean to accept self-signed certificates, it's NOT about http vs https
ok, I'd fall back to https then. If user wants
http
, they need to enter the url with protocol.ok, I'd fall back to https then. If user wants
http
, they need to enter the url with protocol.de5a00e807
into master 2 years agode5a00e807
.