FAQ
Awesome work thanks!!
On Friday, October 14, 2011 11:00:42 PM UTC-4, dlin wrote:

rog, thanks. Here is my workable code.

func main() {
baseurl,_ := url.Parse("http://localhost:6060/pkg"))
println(toAbsUrl(baseur, " ../"))
}

func toAbsUrl(baseurl *url.URL, weburl string) string {
relurl, err := url.Parse(weburl)
if err != nil {
return ""
}
absurl := baseurl.ResolveReference(relurl)
return absurl.String()
}
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 15, '13 at 4:55p
activeJun 15, '13 at 4:55p
posts1
users1
websitegolang.org

1 user in discussion

Robin: 1 post

People

Translate

site design / logo © 2022 Grokbase