Some final adjustments before merge

cron
Jef Roosens 2022-04-06 19:51:54 +02:00
parent c656e672e2
commit dff531d866
Signed by untrusted user: Jef Roosens
GPG Key ID: B75D4F293C7052DB
4 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,7 @@ pub fn load<T>(path string) ?T {
if os.exists(path) { if os.exists(path) {
// We don't use reflect here because reflect also sets any fields not // We don't use reflect here because reflect also sets any fields not
// in the toml back to "empty", which we don't want // in the toml back to their zero value, which we don't want
doc := toml.parse_file(path) ? doc := toml.parse_file(path) ?
$for field in T.fields { $for field in T.fields {

View File

@ -9,7 +9,7 @@ import git
fn main() { fn main() {
mut app := cli.Command{ mut app := cli.Command{
name: 'vieter' name: 'vieter'
description: 'Arch repository server' description: 'Vieter is a lightweight implementation of an Arch repository server.'
version: '0.1.0' version: '0.1.0'
flags: [ flags: [
cli.Flag{ cli.Flag{

View File

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

View File

@ -6,3 +6,4 @@ pkg_dir = "data/pkgs"
# log_level = "DEBUG" # log_level = "DEBUG"
repos_file = "data/repos.json" repos_file = "data/repos.json"
address = "http://localhost:8000"