Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for goEmbed (0.19 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/internal/embedtest/embed_test.go

    		t.Errorf("in uninitialized embed.FS, . is not a directory")
    	}
    }
    
    var (
    	//go:embed "testdata/hello.txt"
    	helloT []T
    	//go:embed "testdata/hello.txt"
    	helloUint8 []uint8
    	//go:embed "testdata/hello.txt"
    	helloEUint8 []EmbedUint8
    	//go:embed "testdata/hello.txt"
    	helloBytes EmbedBytes
    	//go:embed "testdata/hello.txt"
    	helloString EmbedString
    )
    
    type T byte
    type EmbedUint8 uint8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 20:10:16 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  4. src/go/build/read_test.go

    	},
    	{
    		"package p\nimport \"embed\"\nvar i int\n//go:embed x y z\nvar files embed.FS",
    		`test:4:12:x
    		 test:4:14:y
    		 test:4:16:z`,
    	},
    	{
    		"package p\nimport \"embed\"\nvar i int\n//go:embed x \"\\x79\" `z`\nvar files embed.FS",
    		`test:4:12:x
    		 test:4:14:y
    		 test:4:21:z`,
    	},
    	{
    		"package p\nimport \"embed\"\nvar i int\n//go:embed x y\n//go:embed z\nvar files embed.FS",
    		`test:4:12:x
    		 test:4:14:y
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 06 15:53:04 UTC 2021
    - 6K bytes
    - Viewed (0)
  5. src/cmd/go/testdata/script/mod_vendor_embed.txt

    package a
    
    import _ "embed"
    
    //go:embed samedir_embed.txt
    var sameDir string
    
    //go:embed subdir/embed.txt
    var subDir string
    
    func Str() string {
    	return sameDir + subDir
    }
    -- a/a_test.go --
    package a
    
    import _ "embed"
    
    //go:embed subdir/test/embed.txt
    var subderTest string
    -- a/a_x_test.go --
    package a_test
    
    import _ "embed"
    
    //go:embed subdir/test/xtest/embed.txt
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:14:55 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. 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)
  7. test/fixedbugs/issue48230.go

    // errorcheck
    
    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    //go:embed issue48230.go // ERROR `go:embed only allowed in Go files that import "embed"`
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 15 01:35:56 UTC 2021
    - 289 bytes
    - Viewed (0)
  8. test/embedvers.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    import _ "embed"
    
    //go:embed x.txt // ERROR "go:embed requires go1.16 or later"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 19 20:07:52 UTC 2021
    - 292 bytes
    - Viewed (0)
  9. pkg/config/schema/codegen/collections.go

    	"istio.io/istio/pkg/util/sets"
    )
    
    //go:embed templates/gvk.go.tmpl
    var gvkTemplate string
    
    //go:embed templates/gvr.go.tmpl
    var gvrTemplate string
    
    //go:embed templates/crdclient.go.tmpl
    var crdclientTemplate string
    
    //go:embed templates/types.go.tmpl
    var typesTemplate string
    
    //go:embed templates/clients.go.tmpl
    var clientsTemplate string
    
    //go:embed templates/kind.go.tmpl
    var kindTemplate string
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 25 07:19:43 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  10. test/embedfunc.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    import _ "embed"
    
    func f() {
    	//go:embed x.txt // ERROR "go:embed cannot apply to var inside func"
    	var x string
    	_ = x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 19 20:07:52 UTC 2021
    - 308 bytes
    - Viewed (0)
Back to top