Skip to content

Commit 361ae4f

Browse files
committed
all: replace html/template by text/template
Neither `cue add --list` nor cue/stats need to deal with HTML, so text/template is the right one to use. It's entirely possible that gopls or goimports added html/template since they both provide the same package name and API interface. A small yet nice win as well is a ~200KiB size shaving, since html/template is no longer imported at all: $ du -b cue-before cue-after 25738624 cue-before 25535404 cue-after Signed-off-by: Daniel Martí <[email protected]> Change-Id: I7a45bdecf074e294fdc8a2df06e9750ea9f11431 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1172464 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 80b0eee commit 361ae4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/cue/cmd/add.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ import (
1818
"bytes"
1919
"errors"
2020
"fmt"
21-
"html/template"
2221
"io"
2322
"os"
2423
"path/filepath"
2524
"strings"
25+
"text/template"
2626

2727
"github.com/spf13/cobra"
2828

cue/stats/stats.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
package stats
1818

1919
import (
20-
"html/template"
2120
"strings"
21+
"text/template"
2222
)
2323

2424
// Counts holds counters for key events during a CUE evaluation.

0 commit comments

Comments
 (0)