Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for goEmbed (0.12 sec)

  1. src/cmd/go/internal/modindex/build_read.go

    					}
    					c, c1 = c1, r.readByteNoBuf()
    				}
    				startLine = false
    
    			case '/':
    				if startLine {
    					// Try to read this as a //go:embed comment.
    					for i := range goEmbed {
    						c = r.readByteNoBuf()
    						if c != goEmbed[i] {
    							goto SkipSlashSlash
    						}
    					}
    					c = r.readByteNoBuf()
    					if c == ' ' || c == '\t' {
    						// Found one!
    						return true
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 10:10:21 UTC 2023
    - 13K bytes
    - Viewed (0)
  2. src/go/build/read.go

    					}
    					c, c1 = c1, r.readByteNoBuf()
    				}
    				startLine = false
    
    			case '/':
    				if startLine {
    					// Try to read this as a //go:embed comment.
    					for i := range goEmbed {
    						c = r.readByteNoBuf()
    						if c != goEmbed[i] {
    							goto SkipSlashSlash
    						}
    					}
    					c = r.readByteNoBuf()
    					if c == ' ' || c == '\t' {
    						// Found one!
    						return true
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. src/embed/embed.go

    // Embedding one file into a string:
    //
    //	import _ "embed"
    //
    //	//go:embed hello.txt
    //	var s string
    //	print(s)
    //
    // Embedding one file into a slice of bytes:
    //
    //	import _ "embed"
    //
    //	//go:embed hello.txt
    //	var b []byte
    //	print(string(b))
    //
    // Embedded one or more files into a file system:
    //
    //	import "embed"
    //
    //	//go:embed hello.txt
    //	var f embed.FS
    //	data, _ := f.ReadFile("hello.txt")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:42:51 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/noder/noder.go

    		}
    		p.linknames = append(p.linknames, linkname{pos, f[1], target})
    
    	case text == "go:embed", strings.HasPrefix(text, "go:embed "):
    		args, err := parseGoEmbed(text[len("go:embed"):])
    		if err != nil {
    			p.error(syntax.Error{Pos: pos, Msg: err.Error()})
    		}
    		if len(args) == 0 {
    			p.error(syntax.Error{Pos: pos, Msg: "usage: //go:embed pattern..."})
    			break
    		}
    		pragma.Embeds = append(pragma.Embeds, pragmaEmbed{pos, args})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 11 20:40:57 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  5. src/go/types/stdlib_test.go

    		"directive.go",   // tests compiler rejection of bad directive placement - ignore
    		"directive2.go",  // tests compiler rejection of bad directive placement - ignore
    		"embedfunc.go",   // tests //go:embed
    		"embedvers.go",   // tests //go:embed
    		"linkname2.go",   // go/types doesn't check validity of //go:xxx directives
    		"linkname3.go",   // go/types doesn't check validity of //go:xxx directives
    	)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 04:39:56 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stdlib_test.go

    		"directive.go",   // tests compiler rejection of bad directive placement - ignore
    		"directive2.go",  // tests compiler rejection of bad directive placement - ignore
    		"embedfunc.go",   // tests //go:embed
    		"embedvers.go",   // tests //go:embed
    		"linkname2.go",   // types2 doesn't check validity of //go:xxx directives
    		"linkname3.go",   // types2 doesn't check validity of //go:xxx directives
    	)
    }
    
    func TestStdFixed(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:18:33 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. src/cmd/go/internal/list/list.go

            // Embedded files
            EmbedPatterns      []string // //go:embed patterns
            EmbedFiles         []string // files matched by EmbedPatterns
            TestEmbedPatterns  []string // //go:embed patterns in TestGoFiles
            TestEmbedFiles     []string // files matched by TestEmbedPatterns
            XTestEmbedPatterns []string // //go:embed patterns in XTestGoFiles
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 16:56:39 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go

    	"golang.org/x/tools/go/ast/inspector"
    	"golang.org/x/tools/go/types/typeutil"
    	"golang.org/x/tools/internal/typesinternal"
    	"golang.org/x/tools/internal/versions"
    )
    
    //go:embed doc.go
    var doc string
    
    var Analyzer = &analysis.Analyzer{
    	Name:     "loopclosure",
    	Doc:      analysisutil.MustExtractDoc(doc, "loopclosure"),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    	"fmt"
    	"go/ast"
    	"go/token"
    	"go/types"
    	"regexp"
    	"strings"
    	"unicode"
    	"unicode/utf8"
    
    	"golang.org/x/tools/go/analysis"
    	"golang.org/x/tools/go/analysis/passes/internal/analysisutil"
    )
    
    //go:embed doc.go
    var doc string
    
    var Analyzer = &analysis.Analyzer{
    	Name: "tests",
    	Doc:  analysisutil.MustExtractDoc(doc, "tests"),
    	URL:  "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/tests",
    	Run:  run,
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  10. src/internal/trace/traceviewer/http.go

        Polymer.dom(document.body).appendChild(viewer);
    
        url = '/jsontrace?{{PARAMS}}';
        load();
      });
    }());
    </script>
    </head>
    <body>
    </body>
    </html>
    `
    
    //go:embed static/trace_viewer_full.html static/webcomponents.min.js
    var staticContent embed.FS
    
    func StaticHandler() http.Handler {
    	return http.FileServer(http.FS(staticContent))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:29:53 UTC 2023
    - 12.6K bytes
    - Viewed (0)
Back to top