Some final adjustments before merge
parent
c656e672e2
commit
dff531d866
|
@ -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 {
|
||||||
|
|
|
@ -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{
|
||||||
|
|
|
@ -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) ?
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue