mirror of
https://github.com/TaKO8Ki/gobang
synced 2024-10-31 03:20:33 +00:00
Add Configuration section to README (#47)
* add configuration section to README * fix README * update gobang.gif * remove name field
This commit is contained in:
parent
ae639a3da2
commit
24c9b27a43
25
README.md
25
README.md
@ -41,3 +41,28 @@ $ cargo install --version 0.1.0-alpha.0 gobang
|
||||
| <kbd>→</kbd> | Move focus to right |
|
||||
| <kbd>←</kbd> | Move focus to left |
|
||||
| <kbd>/</kbd> | Filter |
|
||||
|
||||
## Configuration
|
||||
|
||||
The location of the file depends on your OS:
|
||||
|
||||
- macOS: `$HOME/.config/gitui/config.toml`
|
||||
- Linux: `$HOME/.config/gitui/config.toml`
|
||||
- Windows: `%APPDATA%/gitui/config.toml`
|
||||
|
||||
The following is a sample config.toml file:
|
||||
|
||||
```toml
|
||||
[[conn]]
|
||||
type = "mysql"
|
||||
user = "root"
|
||||
host = "localhost"
|
||||
port = 3306
|
||||
|
||||
[[conn]]
|
||||
type = "mysql"
|
||||
user = "root"
|
||||
host = "localhost"
|
||||
port = 3306
|
||||
database = "foo"
|
||||
```
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.8 MiB After Width: | Height: | Size: 8.3 MiB |
@ -132,7 +132,7 @@ impl Config {
|
||||
let config_path = if let Some(config_path) = &config.config_path {
|
||||
config_path.clone()
|
||||
} else {
|
||||
get_app_config_path()?.join("config.yml")
|
||||
get_app_config_path()?.join("config.toml")
|
||||
};
|
||||
if let Ok(file) = File::open(config_path) {
|
||||
let mut buf_reader = BufReader::new(file);
|
||||
|
Loading…
Reference in New Issue
Block a user