/
githubmirror
/
lazygit
Обзор
Документация
Войти
/
githubmirror
/
lazygit
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
pkg/commands/git_config/fake_git_config.go
35 строк
678 B
Stefan Haller
Pin the cached git config's commands to the repo directory
20 июл 2026, 18:07
20 июл 2026, 18:07
568a427
Код
Авторство
О чём код?
package git_config type FakeGitConfig struct { mockResponses map[string]string } func NewFakeGitConfig(mockResponses map[string]string) *FakeGitConfig { return &FakeGitConfig{ mockResponses: mockResponses, } } func (self *FakeGitConfig) Get(key string) string { if self.mockResponses == nil { return "" } return self.mockResponses[key] } func (self *FakeGitConfig) GetGeneral(args string) string { if self.mockResponses == nil { return "" } return self.mockResponses[args] } func (self *FakeGitConfig) GetBool(key string) bool { return isTruthy(self.Get(key)) } func (self *FakeGitConfig) SetDir(dir string) { } func (self *FakeGitConfig) DropCache() { }