Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 226 for Embed0 (0.13 sec)

  1. src/cmd/go/testdata/script/list_json_fields.txt

    package main
    
    func main() {}
    -- embed/go.mod --
    module example.com/embed
    -- embed/embed.go --
    package embed
    
    import _ "embed"
    
    //go:embed non-existing-file.txt
    var s string
    -- embed/embed_test.go --
    package embed
    
    import _ "embed"
    
    //go:embed non-existing-file.txt
    var s string
    -- embed/embed_xtest_test.go --
    package embed_test
    
    import _ "embed"
    
    //go:embed non-existing-file.txt
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 15:24:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. tests/test_required_noneable.py

        response = client.post("/body-embed")
        assert response.status_code == 422
    
    
    def test_required_nonable_body_embed_invalid():
        response = client.post("/body-embed", json={"invalid": "invalid"})
        assert response.status_code == 422
    
    
    def test_required_noneable_body_embed_value():
        response = client.post("/body-embed", json={"b": "foo"})
        assert response.status_code == 200
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 14 19:08:31 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/etcd3/testserver/test_server.go

    //   - cleans up the data directory on test termination
    //   - silences server logs other than errors
    func NewTestConfig(t testing.TB) *embed.Config {
    	cfg := embed.NewConfig()
    
    	cfg.UnsafeNoFsync = true
    
    	ports, err := getAvailablePorts(2)
    	if err != nil {
    		t.Fatal(err)
    	}
    	clientURL := url.URL{Scheme: "http", Host: net.JoinHostPort("localhost", strconv.Itoa(ports[0]))}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 06 11:40:40 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. src/embed/internal/embedtest/embed_test.go

    package embedtest
    
    import (
    	"embed"
    	"io"
    	"reflect"
    	"testing"
    	"testing/fstest"
    )
    
    //go:embed testdata/h*.txt
    //go:embed c*.txt testdata/g*.txt
    var global embed.FS
    
    //go:embed c*txt
    var concurrency string
    
    //go:embed testdata/g*.txt
    var glass []byte
    
    func testFiles(t *testing.T, f embed.FS, name, data string) {
    	t.Helper()
    	d, err := f.ReadFile(name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 20:10:16 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modindex/read.go

    		}
    		sf.savedImports = ret
    	})
    	return sf.savedImports
    }
    
    func (sf *sourceFile) embeds() []embed {
    	embedsOffset := sf.embedsOffset()
    	r := sf.d.readAt(embedsOffset)
    	numEmbeds := r.int()
    	ret := make([]embed, numEmbeds)
    	for i := range ret {
    		ret[i] = embed{r.string(), r.tokpos()}
    	}
    	return ret
    }
    
    func (sf *sourceFile) directives() []build.Directive {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  6. src/go/doc/comment/mkstd.sh

    # Use of this source code is governed by a BSD-style
    # license that can be found in the LICENSE file.
    
    # This could be a good use for embed but go/doc/comment
    # is built into the bootstrap go command, so it can't use embed.
    # Also not using embed lets us emit a string array directly
    # and avoid init-time work.
    
    (
    echo "// Copyright 2022 The Go Authors. All rights reserved.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:31:42 UTC 2022
    - 768 bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/build_ignore_leading_bom.txt

    # if it is the first Unicode code point in the source text.
    
    go list -f 'Imports: {{.Imports}} EmbedFiles: {{.EmbedFiles}}' .
    stdout '^Imports: \[embed m/hello\] EmbedFiles: \[.*file\]$'
    
    -- go.mod --
    module m
    
    go 1.16
    -- m.go --
    package main
    
    import (
    	_ "embed"
    
    	"m/hello"
    )
    
    //go:embed file
    var s string
    
    -- hello/hello.go --
    package hello
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 15 18:42:11 UTC 2021
    - 486 bytes
    - Viewed (0)
  8. src/internal/types/testdata/check/cycles4.go

    // license that can be found in the LICENSE file.
    
    package p
    
    import "unsafe"
    
    // Check that all methods of T are collected before
    // determining the result type of m (which embeds
    // all methods of T).
    
    type T interface {
    	m() interface {T}
    	E
    }
    
    var _ int = T.m(nil).m().e()
    
    type E interface {
    	e() int
    }
    
    // Check that unresolved forward chains are followed
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. src/go/types/union.go

    				case t.typ == universeComparable.Type():
    					check.error(tlist[i], InvalidUnion, "cannot use comparable in union")
    				case tset.comparable:
    					check.errorf(tlist[i], InvalidUnion, "cannot use %s in union (%s embeds comparable)", t, t)
    				}
    				continue // terms with interface types are not subject to the no-overlap rule
    			}
    
    			// Report overlapping (non-disjoint) terms such as
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  10. src/embed/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package embed_test
    
    import (
    	"embed"
    	"log"
    	"net/http"
    )
    
    //go:embed internal/embedtest/testdata/*.txt
    var content embed.FS
    
    func Example() {
    	mux := http.NewServeMux()
    	mux.Handle("/", http.FileServer(http.FS(content)))
    	err := http.ListenAndServe(":8080", mux)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:35:13 UTC 2023
    - 464 bytes
    - Viewed (0)
Back to top