Skip to content

Commit af0c9df

Browse files
earthboundkidgopherbot
authored andcommitted
html: add NodeType.String() method
Uses stringer to add String method to html.NodeType. Fixes golang/go#77006 Change-Id: I8120215f859f4c3e6f17757e106cff3936bfa1ba GitHub-Last-Rev: 2082ce0 GitHub-Pull-Request: #244 Reviewed-on: https://go-review.googlesource.com/c/net/+/738100 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
1 parent e02fb33 commit af0c9df

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

html/node.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
// A NodeType is the type of a Node.
1212
type NodeType uint32
1313

14+
//go:generate stringer -type NodeType
1415
const (
1516
ErrorNode NodeType = iota
1617
TextNode

html/nodetype_string.go

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)