diff options
author | Georg Pfuetzenreuter | 2024-10-10 00:04:16 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2024-10-10 00:04:16 +0200 |
commit | dfe7deff72ec77f798efe243c1c22bb63c523040 (patch) | |
tree | 2e6a75f85583b04a7a19c54fade8e5ddb7cc44e6 /main.go | |
parent | e300f7137055a260c522fe546a75e528533cf812 (diff) | |
download | watbot-dfe7deff72ec77f798efe243c1c22bb63c523040.tar.gz watbot-dfe7deff72ec77f798efe243c1c22bb63c523040.tar.bz2 watbot-dfe7deff72ec77f798efe243c1c22bb63c523040.zip |
Configurable database path
Allow the database file to reside in a user defined location instead of
requiring it to be in the working directory.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -20,6 +20,7 @@ type Config struct { } type watConfig struct { + Database string `default:"wat.db" yaml:"database"` Nick string `yaml:"nick"` Pass string `yaml:"pass"` User string `yaml:"user"` @@ -99,6 +100,7 @@ func main() { Name: config.Name, } watConfig := wat.WatConfig{ + DatabasePath: config.Database, AutoJoinChannels: config.Channels.Join, PermittedChannels: config.Channels.Permitted, IgnoredHosts: config.Ignores.Hosts, |