refactor: rename LoadConfig to NewConfig
This commit is contained in:
parent
5361e412ae
commit
be46288500
2 changed files with 3 additions and 2 deletions
2
main.go
2
main.go
|
|
@ -24,7 +24,7 @@ var (
|
|||
)
|
||||
|
||||
func main() {
|
||||
conf = util.LoadConfig()
|
||||
conf = util.NewConfig()
|
||||
|
||||
tview.Borders = conf.Borders
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ type Config struct {
|
|||
Borders borders `toml:"borders"`
|
||||
}
|
||||
|
||||
func LoadConfig() *Config {
|
||||
// NewConfig loads the configuration file, if the configuration file exists or creates a new one if not, and returns it.
|
||||
func NewConfig() *Config {
|
||||
configPath, err := os.UserConfigDir()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue