mod: add configuration for key.dir and key.name
All checks were successful
Go Project Action / Spell-check and test go project (push) Successful in 34s
Release Go Application / Release go project (release) Successful in 30s

This commit is contained in:
2024-10-07 16:47:02 +02:00
parent 283decf747
commit 1b12a22fc5
2 changed files with 7 additions and 4 deletions

View File

@@ -12,6 +12,8 @@ func createDefaultConfig() {
viper.SetDefault("host", "127.0.0.1")
viper.SetDefault("port", "8022")
viper.SetDefault("users", map[string]string{})
viper.SetDefault("key.dir", ".ssh")
viper.SetDefault("key.name", "ssh_ed25519_key")
viper.SetDefault("app.name", "echo")
viper.SetDefault("app.args", []string{"Hello World"})
}
@@ -58,6 +60,7 @@ func main() {
serve.Serve(
viper.GetString("host"),
viper.GetString("port"),
fmt.Sprintf("%s/%s", viper.GetString("key.dir"), viper.GetString("key.name")),
viper.GetStringMapString("users"),
viper.GetString("app.name"),
viper.GetStringSlice("app.args"),