From 870158e48901d7beddcf363a10608ecb476b12ee Mon Sep 17 00:00:00 2001 From: Arthur Lefebvre Date: Mon, 10 Nov 2025 13:42:39 +0100 Subject: [PATCH] Add default value for config --- internal/config/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index dfbea49..db84c67 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -9,11 +9,11 @@ import ( ) type Config struct { - Port string `toml:"port" comment:"The port to listen on for the server."` - DatabaseFilePath string `toml:"database_file_path" comment:"Path to sqlite database file."` + Port string `toml:"port" default:"8080" comment:"The port to listen on for the server."` + DatabaseFilePath string `toml:"database_file_path" default:"plm.db" comment:"Path to sqlite database file."` DemoDataPath string `toml:"demo_data_path" comment:"The path to the sql file to load for demo data."` JWTKey string `toml:"jwt_key" comment:"The key used to encrypt the generated JWT. Encoded in base64. If empty a random one will be generated on every restart."` - ImageFolderPath string `toml:"image_folder_path" comment:"Folder where uploaded files will be stored."` + ImageFolderPath string `toml:"image_folder_path" default:"img" comment:"Folder where uploaded files will be stored."` } func defaultConfig() Config {