mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-26 02:33:31 -06:00
[feature] Basic config validation (#562)
* add optional config validation * clarify that host and protocol are required * add validation for host and protocol * pass prerunArgs as a struct (validate by default)
This commit is contained in:
parent
6838b32235
commit
b915a41811
7 changed files with 180 additions and 15 deletions
|
|
@ -36,7 +36,7 @@ func serverCommands() *cobra.Command {
|
|||
Use: "start",
|
||||
Short: "start the gotosocial server",
|
||||
PreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
return preRun(cmd)
|
||||
return preRun(preRunArgs{cmd: cmd})
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return run(cmd.Context(), server.Start)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue