import os import cli import net.urllib pub fn sync() cli.Command { return cli.Command{ name: 'sync' description: 'sync local dens from remote' execute: execsync } } fn execsync(cmd cli.Command) ! { dens := os.read_lines('/etc/fox/dens')!.map(urllib.parse(it)!) mut threads := []thread !{} for den in dens { threads << spawn update(den) } threads.map(it.wait()!) } fn update(den urllib.URL) ! { println(den.str()) return }