mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 04:51:22 +00:00
24 lines
260 B
Go
24 lines
260 B
Go
package main
|
|
|
|
import (
|
|
"net/url"
|
|
)
|
|
|
|
func assert(cond bool, msg string) {
|
|
if !cond {
|
|
panic(msg)
|
|
}
|
|
}
|
|
|
|
func isRemote(filename string) bool {
|
|
u, err := url.Parse(filename)
|
|
check(err)
|
|
return u.IsAbs()
|
|
}
|
|
|
|
func check(e error) {
|
|
if e != nil {
|
|
panic(e)
|
|
}
|
|
}
|