Просмотр исходного кода

Add doc comment to Config struct

ayntgl 4 лет назад
Родитель
Сommit
c545b4071a
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      util/config.go

+ 2 - 0
util/config.go

@@ -21,6 +21,7 @@ type keybindings struct {
 	MessageInputFieldFocus string
 	MessageInputFieldFocus string
 }
 }
 
 
+// Config consists of fields that can be customized by the user using the configuration file.
 type Config struct {
 type Config struct {
 	Token            string
 	Token            string
 	Mouse            bool
 	Mouse            bool
@@ -31,6 +32,7 @@ type Config struct {
 	Keybindings      keybindings
 	Keybindings      keybindings
 }
 }
 
 
+// LoadConfig createsa new configuration file (if does not exist) and returns the default configuration or reads the existing configuration file from the default path.
 func LoadConfig() *Config {
 func LoadConfig() *Config {
 	u, err := os.UserHomeDir()
 	u, err := os.UserHomeDir()
 	if err != nil {
 	if err != nil {