1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

bring back map.str()

This commit is contained in:
Alexander Medvednikov
2019-08-05 04:34:12 +02:00
parent 8d3617b3de
commit 5ed338dc2e
3 changed files with 24 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ import (
const (
//url = 'http://localhost:8089'
url = 'http://vpm.vlang.io'
url = 'https://vpm.best'
)
struct Mod {
@@ -25,7 +25,10 @@ fn main() {
}
name := os.args.last()
s := http.get_text(url + '/jsmod/$name')
mod := json.decode(Mod, s) or { return }
mod := json.decode(Mod, s) or {
println('Error. Make sure you are online.')
return
}
home := os.home_dir()
os.exec('git -C "$home/.vmodules" clone --depth=1 $mod.url $mod.name')
println(s)