Haibin's Blog

How to Make a Copy of URL in go

Posted on December 12, 2017

An interesting example of making a copy of URL in go https://github.com/go-kit/kit/blob/master/examples/addsvc/pkg/addtransport/http.go#L123

func copyURL(base *url.URL, path string) *url.URL {
	next := *base
	next.Path = path
	return &next
}
  • ← Previous Post
  • Next Post →

Liu Haibin  •  2018  •  Haibin's Blog

Hugo v0.48 powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo