1
0
mirror of https://github.com/golang/go synced 2024-09-25 15:10:11 -06:00

cmd/trace: don't fail when no browser is available

When there is no browser available on the system,
we should print the URL instead of failing.

Change-Id: I4a2b099e17609394273eff150062c285d76bbac1
Reviewed-on: https://go-review.googlesource.com/13774
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This commit is contained in:
David du Colombier 2015-08-21 20:31:50 +02:00
parent 13b5dc885b
commit 9538e4e73b

View File

@ -71,7 +71,7 @@ func main() {
}
// Open browser.
if !startBrowser("http://" + ln.Addr().String()) {
dief("failed to start browser\n")
fmt.Fprintf(os.Stderr, "Trace viewer is listening on http://%s\n", ln.Addr().String())
}
// Parse and symbolize trace asynchronously while browser opens.