]> Cypherpunks repositories - gostls13.git/commitdiff
doc/tmptohtml: output fix
authorChristopher Wedgwood <cw@f00f.org>
Mon, 28 Nov 2011 17:50:40 +0000 (09:50 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 28 Nov 2011 17:50:40 +0000 (09:50 -0800)
R=r, gri
CC=golang-dev
https://golang.org/cl/5441047

doc/tmpltohtml.go

index fc5034ca9fa7504c5933f996e6b45c652f3014f8..1e3424cf5efeaae59d327a4968a9f2f3721799ea 100644 (file)
@@ -141,7 +141,7 @@ func multipleLines(file, text string, arg1, arg2 interface{}) string {
        if !isInt2 {
                line2 = match(file, line1, lines, pattern2)
        } else if line2 < line1 {
-               log.Fatal("lines out of order for %q: %d %d", line1, line2)
+               log.Fatalf("lines out of order for %q: %d %d", text, line1, line2)
        }
        return strings.Join(lines[line1-1:line2], "")
 }
@@ -153,7 +153,7 @@ func match(file string, start int, lines []string, pattern string) int {
        // $ matches the end of the file.
        if pattern == "$" {
                if len(lines) == 0 {
-                       log.Fatal("%q: empty file", file)
+                       log.Fatalf("%q: empty file", file)
                }
                return len(lines)
        }