// Parsing a URL and getting its path u, _ := url.Parse("https://example.com/path/to/resource") path := u.Path // Creating a new URL with a different path u.Path = "/new/path" newURL := u.String() // Joining two URL paths path1 := "/path/to" path2 := "resource" joinedPath := path.Join(path1, path2)In the first example, we parse a URL and get its path using the `Path` field of the `url.URL` struct. In the second example, we create a new URL by modifying the `Path` field and getting its string representation using the `String()` method. In the third example, we join two URL paths using the `path.Join()` function. These code examples use the net/url package.