Change-Id: Ibbd2bda7ff2ea3c782ad41f6f00ad62849a4f066
Reviewed-on: https://go-review.googlesource.com/c/go/+/618756
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
// true
}
+func ExampleURL_JoinPath() {
+ u, err := url.Parse("https://example.com/foo/bar")
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ fmt.Println(u.JoinPath("baz", "qux"))
+
+ // Output:
+ // https://example.com/foo/bar/baz/qux
+}
+
func ExampleURL_MarshalBinary() {
u, _ := url.Parse("https://example.org")
b, err := u.MarshalBinary()