Skip to content

Commit a3f3e02

Browse files
committed
Print only first title in get-title
1 parent 09e8c63 commit a3f3e02

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

get-title/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func extractTitle(req *http.Request, resp *http.Response, err error) {
3131
if z.Next() == html.TextToken {
3232
title := strings.TrimSpace(z.Token().Data)
3333
fmt.Printf("%s (%s)\n", title, req.URL)
34+
break
3435
}
3536
}
3637

0 commit comments

Comments
 (0)