mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
more refactoring
This commit is contained in:
parent
06687c8a59
commit
a936c0592f
5 changed files with 135 additions and 135 deletions
|
@ -39,11 +39,13 @@ func NewGuiIO(log *logrus.Entry, logCommandFn func(string, bool), newCmdWriterFn
|
|||
}
|
||||
}
|
||||
|
||||
// we use this function when we want to access the functionality of our OS struct but we
|
||||
// don't have anywhere to log things, or request input from the user.
|
||||
func NewNullGuiIO(log *logrus.Entry) *guiIO {
|
||||
return &guiIO{
|
||||
log: log,
|
||||
logCommandFn: func(string, bool) {},
|
||||
newCmdWriterFn: func() io.Writer { return ioutil.Discard },
|
||||
promptForCredentialFn: func(CredentialType) string { return "" },
|
||||
promptForCredentialFn: failPromptFn,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue