- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 938 for comment2 (0.32 sec)
-
src/go/printer/printer_test.go
comment := f.Comments[0].List[0] pos := comment.Pos() if fset.PositionFor(pos, false /* absolute position */).Offset != 1 { t.Error("expected offset 1") // error in test } testComment(t, f, len(src), &ast.Comment{Slash: pos, Text: "//-style comment"}) testComment(t, f, len(src), &ast.Comment{Slash: pos, Text: "/*-style comment */"}) testComment(t, f, len(src), &ast.Comment{Slash: pos, Text: "/*-style \n comment */"})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 20.4K bytes - Viewed (0) -
src/text/template/parse/parse_test.go
// Specific errors. {"function", "{{foo}}", hasError, `function "foo" not defined`}, {"comment1", "{{/*}}", hasError, `comment1:1: unclosed comment`}, {"comment2", "{{/*\nhello\n}}", hasError, `comment2:1: unclosed comment`}, {"lparen", "{{.X (1 2 3}}", hasError, `unclosed left paren`}, {"rparen", "{{.X 1 2 3 ) }}",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 21:59:12 UTC 2024 - 24K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/mod/modfile/read.go
} // Comments collects the comments associated with an expression. type Comments struct { Before []Comment // whole-line comments before this expression Suffix []Comment // end-of-line comments after this expression // For top-level expressions only, After lists whole-line // comments following the expression. After []Comment }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 23.1K bytes - Viewed (0) -
operator/pkg/object/testdata/well-formed-with-comments.yaml
# some random comments # some random comments apiVersion: v1 kind: ConfigMap metadata: name: myconfigmap namespace: default # some random comments should be deleted data: mydata: |- First line of data # some random comments should not be deleted Second line of data
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jul 25 19:39:36 UTC 2023 - 304 bytes - Viewed (0) -
.github/actions/notify-translations/app/main.py
) for comment in comments: if new_translation_message in comment.body: already_notified_comment = comment elif done_translation_message in comment.body: already_done_comment = comment logging.info( f"Already notified comment: {already_notified_comment}, already done comment: {already_done_comment}" )
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Wed Sep 27 23:01:46 UTC 2023 - 12.4K bytes - Viewed (0) -
src/go/printer/printer.go
for i < len(comments) && comments[i].End() < beg { i++ } j := i for j < len(comments) && comments[j].Pos() < end { j++ } if i < j { p.comments = comments[i:j] } } else if n, ok := node.(*ast.File); ok { // use ast.File comments, if any p.comments = n.Comments } // if there are no comments, use node comments p.useNodeComments = p.comments == nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 41.6K bytes - Viewed (0) -
operator/pkg/object/testdata/well-formed-with-comments.out.yaml
apiVersion: v1 kind: ConfigMap metadata: name: myconfigmap namespace: default data: mydata: |- First line of data # some random comments should not be deleted
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jul 25 19:39:36 UTC 2023 - 193 bytes - Viewed (0) -
src/go/ast/commentmap.go
// // NewCommentMap tries to associate a comment group to the "largest" // node possible: For instance, if the comment is a line comment // trailing an assignment, the comment is associated with the entire // assignment rather than just the last operand in the assignment. func NewCommentMap(fset *token.FileSet, node Node, comments []*CommentGroup) CommentMap { if len(comments) == 0 { return nil // no comments to map }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.9K bytes - Viewed (0) -
src/go/ast/example_test.go
// (the comments associated with the variable declaration), and create // the new comments list. f.Comments = cmap.Filter(f).Comments() // Print the modified AST. var buf strings.Builder if err := format.Node(&buf, fset, f); err != nil { panic(err) } fmt.Printf("%s", buf.String()) // Output: // // This is the package comment. // package main // // // This comment is associated with the hello constant.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/go/ast/import.go
} else { // An import spec can have both block comment and a line comment // to its right. In that case, both of them will have the same pos. // But while formatting the AST, the line comment gets moved to // after the block comment. c.Slash = pos[i].End } } } } slices.SortFunc(comments, func(a, b *CommentGroup) int { return cmp.Compare(a.Pos(), b.Pos()) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 5.7K bytes - Viewed (0)