mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-06 20:02:53 +02:00
[Refactor] unexport config.Config var & move login tasks to task module (#288)
Unexport generateToken() move CreateLogin into task Create func config.SetDefaultLogin() Unexport loadConfig() & saveConfig unexport config var make SetDefaultLogin() case insensitive update func descriptions move FindSSHKey to task module Reviewed-on: https://gitea.com/gitea/tea/pulls/288 Reviewed-by: Norwin <noerw@noreply.gitea.io> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-Authored-By: 6543 <6543@obermui.de> Co-Committed-By: 6543 <6543@obermui.de>
This commit is contained in:
@ -25,12 +25,12 @@ var CmdLoginList = cli.Command{
|
||||
}
|
||||
|
||||
// RunLoginList list all logins
|
||||
func RunLoginList(ctx *cli.Context) error {
|
||||
err := config.LoadConfig()
|
||||
func RunLoginList(_ *cli.Context) error {
|
||||
logins, err := config.GetLogins()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
print.LoginsList(config.Config.Logins, flags.GlobalOutputValue)
|
||||
print.LoginsList(logins, flags.GlobalOutputValue)
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user