From 98abf2937e42d560f0a8ba3c9e5bd5351c5316e6 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Thu, 26 Nov 2015 17:45:09 -0500 Subject: [PATCH] cmd/cover: allow part selection to be retained across page refreshes Usually, you are primarily interested to see the coverage of a particular file (e.g. when you're changing tests that affects a given source file), it is very valuable if you can just refresh the page and immediately see changes to the part you're already looking at (without selecting from the selector again.) Change-Id: I615207c9be6713f436e444771134fceaf4600ff3 Reviewed-on: https://go-review.googlesource.com/17238 Run-TryBot: Minux Ma TryBot-Result: Gobot Gobot Reviewed-by: Andrew Gerrand --- src/cmd/cover/html.go | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/cmd/cover/html.go b/src/cmd/cover/html.go index bb0a495ae7..d0ac4476ba 100644 --- a/src/cmd/cover/html.go +++ b/src/cmd/cover/html.go @@ -258,21 +258,35 @@ const tmplHTML = `
{{range $i, $f := .Files}} -
{{$f.Body}}
+ {{end}}
-- 2.48.1