aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-faster/errors/example_Must_test.go
blob: 32f3a8a216624bcdc92cccec470027310c6a2137 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//go:build go1.18

package errors_test

import (
	"fmt"
	"net/url"

	"github.com/go-faster/errors"
)

func ExampleMust() {
	r := errors.Must(url.Parse(`https://google.com`))
	fmt.Println(r.String())

	// Output:
	// https://google.com
}