go/ast.Comment.Text (field)

27 uses

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

	go/build
		read.go#L499: 			if strings.HasPrefix(c.Text, "//go:") {
		read.go#L500: 				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#L178: 	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] == '/' ||