From the course: Learning the Go Standard Library

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with URLs

Working with URLs - Go Tutorial

From the course: Learning the Go Standard Library

Start my 1-month free trial

Working with URLs

- [Tutor] Okay. In this chapter we're going to learn how to use the Go Package Library for common networking related tasks. And we're going to start by seeing how to work with URLs. And URLs are of course, one of the basic building blocks of the web and working with their various parts are a pretty common task, when building web applications. So you can find the docs for the URL package at this link. And I'll let you read that over in your own time. It's not very large. And for the most part, the functions are most commonly used are just a subset of what you see here. So let's jump over to our code editor, right? So here I am in my editor and in the start folder for chapter five, I'm going to open up, URLs start and you can see here in the file I have defined a URL with several parts. So we have the protocol and then we have the domain, the port number. We have a path and a query string. So let's use the URL…

Contents