Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 336 for Map (0.02 sec)

  1. src/net/http/pprof/pprof_test.go

    	"time"
    )
    
    // TestDescriptions checks that the profile names under runtime/pprof package
    // have a key in the description map.
    func TestDescriptions(t *testing.T) {
    	for _, p := range pprof.Profiles() {
    		_, ok := profileDescriptions[p.Name()]
    		if ok != true {
    			t.Errorf("%s does not exist in profileDescriptions map\n", p.Name())
    		}
    	}
    }
    
    func TestHandlers(t *testing.T) {
    	testCases := []struct {
    		path               string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 19:52:28 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  2. src/crypto/tls/alert.go

    	alertUnknownPSKIdentity           alert = 115
    	alertCertificateRequired          alert = 116
    	alertNoApplicationProtocol        alert = 120
    	alertECHRequired                  alert = 121
    )
    
    var alertText = map[alert]string{
    	alertCloseNotify:                  "close notify",
    	alertUnexpectedMessage:            "unexpected message",
    	alertBadRecordMAC:                 "bad record MAC",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. src/internal/types/testdata/fixedbugs/issue67547.go

    func _[P []int]() {
    	type A = P
    	_ = make(A, 10) // don't report an error for A
    }
    
    func _[P string]() {
    	var t []byte
    	type A = P
    	var s A
    	copy(t, s) // don't report an error for s
    }
    
    func _[P map[int]int]() {
    	type A = P
    	var m A
    	clear(m) // don't report an error for m
    }
    
    type S1 struct {
    	x int "S1.x"
    }
    
    type S2 struct {
    	x int "S2.x"
    }
    
    func _[P1 S1, P2 S2]() {
    	type A = P1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. src/strconv/atob_test.go

    			if e != nil {
    				t.Errorf("ParseBool(%s) = %s; want nil", test.in, e)
    			}
    			if b != test.out {
    				t.Errorf("ParseBool(%s) = %t; want %t", test.in, b, test.out)
    			}
    		}
    	}
    }
    
    var boolString = map[bool]string{
    	true:  "true",
    	false: "false",
    }
    
    func TestFormatBool(t *testing.T) {
    	for b, s := range boolString {
    		if f := FormatBool(b); f != s {
    			t.Errorf("FormatBool(%v) = %q; want %q", b, f, s)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 18:08:43 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. src/cmd/go/internal/vet/vetflag.go

    	// Some flags, in particular -tags and -v, are known to vet but
    	// also defined as build flags. This works fine, so we omit duplicates here.
    	// However some, like -x, are known to the build but not to vet.
    	isVetFlag := make(map[string]bool, len(analysisFlags))
    	cf := CmdVet.Flag
    	for _, f := range analysisFlags {
    		isVetFlag[f.Name] = true
    		if cf.Lookup(f.Name) == nil {
    			if f.Bool {
    				cf.Bool(f.Name, false, "")
    			} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 14:42:39 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/telemetry/internal/upload/date.go

    	return begin, end, nil
    }
    
    // avoid parsing count files multiple times
    type parsedCache struct {
    	mu sync.Mutex
    	m  map[string]*counter.File
    }
    
    func (u *uploader) parseCountFile(fname string) (*counter.File, error) {
    	u.cache.mu.Lock()
    	defer u.cache.mu.Unlock()
    	if u.cache.m == nil {
    		u.cache.m = make(map[string]*counter.File)
    	}
    	if f, ok := u.cache.m[fname]; ok {
    		return f, nil
    	}
    	buf, err := os.ReadFile(fname)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:12:15 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. src/net/http/mapping.go

    // A zero mapping is empty and ready to use.
    // A mapping tries to pick a representation that makes [mapping.find] most efficient.
    type mapping[K comparable, V any] struct {
    	s []entry[K, V] // for few pairs
    	m map[K]V       // for many pairs
    }
    
    type entry[K comparable, V any] struct {
    	key   K
    	value V
    }
    
    // maxSlice is the maximum number of pairs for which a slice is used.
    // It is a variable for benchmarking.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 17:47:07 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  8. src/internal/coverage/cfile/testsupport.go

    	}
    	newgran := mfr.CounterGranularity()
    	if err := ts.cm.SetModeAndGranularity(p.MetaFile, cmode, newgran); err != nil {
    		return err
    	}
    
    	// A map to store counter data, indexed by pkgid/fnid tuple.
    	pmm := make(map[pkfunc][]uint32)
    
    	// Helper to read a single counter data file.
    	readcdf := func(cdf string) error {
    		cf, err := os.Open(cdf)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. src/net/netip/inlining_test.go

    	t.Parallel()
    	out, err := exec.Command(
    		testenv.GoToolPath(t),
    		"build",
    		"--gcflags=-m",
    		"net/netip").CombinedOutput()
    	if err != nil {
    		t.Fatalf("go build: %v, %s", err, out)
    	}
    	got := map[string]bool{}
    	regexp.MustCompile(` can inline (\S+)`).ReplaceAllFunc(out, func(match []byte) []byte {
    		got[strings.TrimPrefix(string(match), " can inline ")] = true
    		return nil
    	})
    	wantInlinable := []string{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 2K bytes
    - Viewed (0)
  10. src/syscall/mkasm.go

    	}
    	in3, err := os.ReadFile("z" + syscallArchFilename)
    	if err != nil {
    		log.Fatalf("can't open syscall file: %s", err)
    	}
    	in := string(in1) + string(in2) + string(in3)
    
    	trampolines := map[string]bool{}
    
    	var out bytes.Buffer
    
    	fmt.Fprintf(&out, "// go run mkasm.go %s\n", strings.Join(os.Args[1:], " "))
    	fmt.Fprintf(&out, "// Code generated by the command above; DO NOT EDIT.\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 03:24:15 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top