chore: ran v fmt for v 0.3.3 changes
This commit is contained in:
parent
e10b450abd
commit
b3a119f221
37 changed files with 179 additions and 175 deletions
|
|
@ -36,7 +36,7 @@ pub fn cmd() cli.Command {
|
|||
required_args: 2
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
c := aur.new()
|
||||
pkgs := c.info(cmd.args[1..])!
|
||||
|
|
@ -46,14 +46,14 @@ pub fn cmd() cli.Command {
|
|||
for pkg in pkgs {
|
||||
vc.add_target(
|
||||
kind: 'git'
|
||||
url: 'https://aur.archlinux.org/$pkg.package_base' + '.git'
|
||||
url: 'https://aur.archlinux.org/${pkg.package_base}' + '.git'
|
||||
repo: cmd.args[0]
|
||||
) or {
|
||||
println('Failed to add $pkg.name: $err.msg()')
|
||||
println('Failed to add ${pkg.name}: ${err.msg()}')
|
||||
continue
|
||||
}
|
||||
|
||||
println('Added $pkg.name' + '.')
|
||||
println('Added ${pkg.name}' + '.')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ pub fn cmd() cli.Command {
|
|||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
mut filter := BuildLogFilter{}
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ pub fn cmd() cli.Command {
|
|||
description: 'Remove a build log that matches the given id.'
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
remove(conf, cmd.args[0])!
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ pub fn cmd() cli.Command {
|
|||
description: 'Show all info for a specific build log.'
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
id := cmd.args[0].int()
|
||||
info(conf, id)!
|
||||
|
|
@ -181,7 +181,7 @@ pub fn cmd() cli.Command {
|
|||
description: 'Output the content of a build log to stdout.'
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
id := cmd.args[0].int()
|
||||
content(conf, id)!
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub fn cmd() cli.Command {
|
|||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
if cmd.args.len < 3 {
|
||||
if !cmd.flags.get_bool('force')! {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ pub fn cmd() cli.Command {
|
|||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
mut filter := TargetFilter{}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ pub fn cmd() cli.Command {
|
|||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
t := NewTarget{
|
||||
kind: cmd.flags.get_string('kind')!
|
||||
|
|
@ -135,7 +135,7 @@ pub fn cmd() cli.Command {
|
|||
description: 'Remove a target that matches the given id.'
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
remove(conf, cmd.args[0])!
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ pub fn cmd() cli.Command {
|
|||
description: 'Show detailed information for the target matching the id.'
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
info(conf, cmd.args[0])!
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ pub fn cmd() cli.Command {
|
|||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
found := cmd.flags.get_all_found()
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ pub fn cmd() cli.Command {
|
|||
]
|
||||
execute: fn (cmd cli.Command) ! {
|
||||
config_file := cmd.flags.get_string('config-file')!
|
||||
conf := vconf.load<Config>(prefix: 'VIETER_', default_path: config_file)!
|
||||
conf := vconf.load[Config](prefix: 'VIETER_', default_path: config_file)!
|
||||
|
||||
remote := cmd.flags.get_bool('remote')!
|
||||
force := cmd.flags.get_bool('force')!
|
||||
|
|
@ -280,7 +280,7 @@ fn add(conf Config, t &NewTarget, raw bool) ! {
|
|||
if raw {
|
||||
println(target_id)
|
||||
} else {
|
||||
println('Target added with id $target_id')
|
||||
println('Target added with id ${target_id}')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -296,7 +296,7 @@ fn patch(conf Config, id string, params map[string]string) ! {
|
|||
// invalid one to the server.
|
||||
if 'schedule' in params && params['schedule'] != '' {
|
||||
cron.parse_expression(params['schedule']) or {
|
||||
return error('Invalid cron expression: $err.msg()')
|
||||
return error('Invalid cron expression: ${err.msg()}')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue