feat: use go tool

This commit is contained in:
2026-07-03 19:24:01 -04:00
parent 39548b4332
commit 4d0cab1fe0
1542 changed files with 252399 additions and 14 deletions
+21
View File
@@ -0,0 +1,21 @@
export default function format (url) {
let result = ''
result += url.protocol || ''
result += url.slashes ? '//' : ''
result += url.auth ? url.auth + '@' : ''
if (url.hostname && url.hostname.indexOf(':') !== -1) {
// ipv6 address
result += '[' + url.hostname + ']'
} else {
result += url.hostname || ''
}
result += url.port ? ':' + url.port : ''
result += url.pathname || ''
result += url.search || ''
result += url.hash || ''
return result
};