This PR changes the name of go-sbot.service to be configurable, using go-sbot.service as the default.
This is possibly unnecessary but is the only thing to my knowledge which would prevent a yunohost installation with multiple instances installed on the same machine (admittedly I mightly partly succumbing to yunohost gamification here, where if you pass all the criteria, including multi-install, your applications gets a higher level... I am a sucker for points... but maybe this is a small change...)
This PR changes the name of go-sbot.service to be configurable, using go-sbot.service as the default.
This is possibly unnecessary but is the only thing to my knowledge which would prevent a yunohost installation with multiple instances installed on the same machine (admittedly I mightly partly succumbing to yunohost gamification here, where if you pass all the criteria, including multi-install, your applications gets a higher level... I am a sucker for points... but maybe this is a small change...)
Looks good! I just left a single comment about module / function imports.
Seems like there's a small merge conflict to resolve and then you're good to go.
Looks good! I just left a single comment about module / function imports.
Seems like there's a small merge conflict to resolve and then you're good to go.
The result is more verbose and not as pretty and clean, but it helps to communicate where this get_config_value function is defined. This has saved me a lot of time in the past when I'm trying to follow the code and find functions: "Does this function live in this file or somewhere else?". It's also the idiomatic way for Rust.
One suggestion I have is to reference the module when calling the function (ie. to not import all the way down to the function level):
```rust
use crate::config_manager;
let info_output = Command::new("systemctl")
.arg("show")
.arg(config_manager::get_config_value("GO_SBOT_SERVICE")?)
```
The result is more verbose and not as pretty and clean, but it helps to communicate where this `get_config_value` function is defined. This has saved me a lot of time in the past when I'm trying to follow the code and find functions: "Does this function live in this file or somewhere else?". It's also the idiomatic way for Rust.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR changes the name of go-sbot.service to be configurable, using go-sbot.service as the default.
This is possibly unnecessary but is the only thing to my knowledge which would prevent a yunohost installation with multiple instances installed on the same machine (admittedly I mightly partly succumbing to yunohost gamification here, where if you pass all the criteria, including multi-install, your applications gets a higher level... I am a sucker for points... but maybe this is a small change...)
Looks good! I just left a single comment about module / function imports.
Seems like there's a small merge conflict to resolve and then you're good to go.
@@ -68,3 +68,3 @@let info_output = Command::new("systemctl").arg("show").arg("go-sbot.service").arg(get_config_value("GO_SBOT_SERVICE")?)One suggestion I have is to reference the module when calling the function (ie. to not import all the way down to the function level):
The result is more verbose and not as pretty and clean, but it helps to communicate where this
get_config_valuefunction is defined. This has saved me a lot of time in the past when I'm trying to follow the code and find functions: "Does this function live in this file or somewhere else?". It's also the idiomatic way for Rust.cool I updated all the get_config_value I could find to use this form
Green checkmark, merging this in.