1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-25 12:24:47 +02:00
lazygit/pkg/config/dummies.go
Stefan Haller 48bb3a9dce Make fields of AppConfig private
We are going to make a few changes to the fields in this branch, and we can make
them with more peace of mind when we can be sure they are not accessed from
outside this package.
2024-08-18 10:24:52 +02:00

19 lines
384 B
Go

package config
import (
"gopkg.in/yaml.v3"
)
// NewDummyAppConfig creates a new dummy AppConfig for testing
func NewDummyAppConfig() *AppConfig {
appConfig := &AppConfig{
name: "lazygit",
version: "unversioned",
debug: false,
userConfig: GetDefaultConfig(),
appState: &AppState{},
}
_ = yaml.Unmarshal([]byte{}, appConfig.appState)
return appConfig
}