go/ast.Comment.Text (field)

36 uses

	go/ast (current package)
		ast.go#L70: 	Text  string    // comment text (excluding '\n' for //-style comments)
		ast.go#L74: func (c *Comment) End() token.Pos { return token.Pos(int(c.Slash) + len(c.Text)) }
		ast.go#L107: 		comments[i] = c.Text
		ast.go#L1132: 			if strings.Contains(comment.Text, prefix) {
		ast.go#L1133: 				for line := range strings.SplitSeq(comment.Text, "\n") {
		commentmap.go#L276: 			buf.WriteString(comment.Text)

	go/build
		read.go#L360: 			if strings.HasPrefix(c.Text, "//go:") {
		read.go#L361: 				info.directives = append(info.directives, Directive{c.Text, info.fset.Position(c.Slash)})

	go/doc
		reader.go#L548: 			if noteCommentRx.MatchString(c.Text) {

	go/parser
		parser.go#L198: 	comment = &ast.Comment{Slash: p.pos, Text: p.lit}

	go/printer
		comment.go#L19: 	if len(list) == 1 && strings.HasPrefix(list[0].Text, "/*") {
		comment.go#L21: 		text = list[0].Text
		comment.go#L35: 	} else if strings.HasPrefix(list[0].Text, "//") {
		comment.go#L39: 			after, found := strings.CutPrefix(c.Text, "//")
		comment.go#L73: 			Text:  "/*\n" + text + "*/",
		comment.go#L92: 			Text:  line,
		comment.go#L98: 			Text:  "//",
		comment.go#L103: 				Text:  c.Text,
		nodes.go#L490: 	p.setComment(&ast.CommentGroup{List: []*ast.Comment{{Slash: token.NoPos, Text: text}}})
		printer.go#L118: 		if t := c.Text; len(t) >= 2 && (t[1] == '/' || strings.Contains(t, "\n")) {
		printer.go#L161: 			size += len(c.Text)
		printer.go#L361: 	if pos.Line == p.last.Line && (prev == nil || prev.Text[1] != '/') {
		printer.go#L459: 		if n == 0 && prev != nil && prev.Text[1] == '/' {
		printer.go#L630: 	text := comment.Text
		printer.go#L790: 			last.Text[1] == '*' && p.lineFor(last.Pos()) == next.Line &&
		printer.go#L802: 		if last.Text[1] == '/' ||

	go.pact.im/x/plumb/internal/discover
		discover.go#L45: 		d, ok := ast.ParseDirective(c.Slash, c.Text)
		discover.go#L55: 				"//%s; the set name must be a valid Go identifier", strings.TrimPrefix(c.Text, "//"))
		discover.go#L59: 				"//%s; a plumb directive names only a set, with no trailing arguments", strings.TrimPrefix(c.Text, "//"))
		discover.go#L66: 				"//%s; the declaration already joins set %q: remove the duplicate directive", strings.TrimPrefix(c.Text, "//"), d.Name)
		discover.go#L186: 			d, ok := ast.ParseDirective(c.Slash, c.Text)
		discover.go#L192: 				strings.TrimPrefix(c.Text, "//"))
		discover.go#L353: 				if d, ok := ast.ParseDirective(c.Slash, c.Text); ok && d.Tool == "plumb" {
		discover.go#L356: 						strings.TrimPrefix(c.Text, "//"))
		discover.go#L614: 			if d, ok := ast.ParseDirective(c.Slash, c.Text); ok && d.Tool == "plumb" {