refactor: compile on V 0.3.2
Some checks failed
ci/woodpecker/pr/docs Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
ci/woodpecker/pr/man unknown status
ci/woodpecker/pr/docker unknown status
ci/woodpecker/pr/test Pipeline failed

This commit is contained in:
Jef Roosens 2022-11-01 21:10:45 +01:00
parent ed29102717
commit 22fd6e395b
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
23 changed files with 205 additions and 203 deletions

View file

@ -18,11 +18,11 @@ pub fn cmd() cli.Command {
return cli.Command{
name: 'server'
description: 'Start the Vieter server.'
execute: fn (cmd cli.Command) ? {
config_file := cmd.flags.get_string('config-file')?
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)?
execute: fn (cmd cli.Command) ! {
config_file := cmd.flags.get_string('config-file')!
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
server(conf)?
server(conf)!
}
}
}

View file

@ -24,7 +24,7 @@ pub mut:
}
// server starts the web server & starts listening for requests
pub fn server(conf Config) ? {
pub fn server(conf Config) ! {
// Prevent using 'any' as the default arch
if conf.default_arch == 'any' {
util.exit_with_message(1, "'any' is not allowed as the value for default_arch.")