Skip to content

Commit

Permalink
Remove unused configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalvatori committed Dec 26, 2020
1 parent 85a065b commit 7d28feb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

## Setup

You **must** set the **ZBOT_CONFIG_FILE** environment variable with the path to the configuration file
You **must** set the environment variable **ZBOT_CONFIG_FILE** with the path to the configuration file
* ZBOT_CONFIG_FILE : Path to the configuration file (default ./zbot.conf)
* ZBOT_LOG_LEVEL : Log verbosity (default info)

## Configuration File

Expand All @@ -23,12 +24,7 @@ zbot:
level: false
db:
engine: sqlite
name: db_name
file: path_to_sqlite_file.db
host: 127.0.0.1
port: 3306
username: db_username
password: db_password
commands:
learn:
disabled:
Expand Down
14 changes: 2 additions & 12 deletions configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ type Configuration struct {
} `yaml:"zbot"`
Db struct {
Engine string `yaml:"engine"`
Name string `yaml:"name"`
File string `yaml:"file"`
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
} `yaml:"db"`
Commands struct {
Learn struct {
Expand Down Expand Up @@ -67,13 +62,8 @@ type configurationZbot struct {
}

type configurationDb struct {
Engine string `yaml:"engine"`
Name string `yaml:"name"`
File string `yaml:"file"`
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Engine string `yaml:"engine"`
File string `yaml:"file"`
}

type configurationLearn struct {
Expand Down
9 changes: 2 additions & 7 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ var confTest = Configuration{
Level: false,
},
Db: configurationDb{
Engine: "sqlite",
Name: "",
File: "",
Host: "",
Port: 1234,
Username: "test",
Password: "paswsword",
Engine: "sqlite",
File: "",
},
Commands: configurationCommands{
Learn: configurationLearn{
Expand Down

0 comments on commit 7d28feb

Please sign in to comment.