Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 341 for Map (0.23 sec)

  1. test/nilptr3.go

    	_ = &x[9] // ERROR "removed[a-z ]* nil check"
    }
    
    func m1(m map[int][80]byte) byte {
    	v := m[3] // ERROR "removed nil check"
    	return v[5]
    }
    func m2(m map[int][800]byte) byte {
    	v := m[3] // ERROR "removed nil check"
    	return v[5]
    }
    func m3(m map[int][80]byte) (byte, bool) {
    	v, ok := m[3] // ERROR "removed nil check"
    	return v[5], ok
    }
    func m4(m map[int][800]byte) (byte, bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  2. src/maps/example_test.go

    	fmt.Println("m3 is:", m3)
    	fmt.Println("m4 is:", m4)
    
    	// Output:
    	// m2 is: map[one:1 two:2]
    	// m1 is: map[one:1 two:2]
    	// m2 is: map[one:100 two:2]
    	// m4 is: map[one:[1 2 3] two:[4 5 6]]
    	// m3 is: map[one:[100 2 3] two:[4 5 6]]
    	// m4 is: map[one:[100 2 3] two:[4 5 6]]
    }
    
    func ExampleDeleteFunc() {
    	m := map[string]int{
    		"one":   1,
    		"two":   2,
    		"three": 3,
    		"four":  4,
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 11 20:21:56 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/runtime/mem_darwin.go

    	if err == _ENOMEM {
    		throw("runtime: out of memory")
    	}
    	if p != v || err != 0 {
    		print("runtime: mmap(", v, ", ", n, ") returned ", p, ", ", err, "\n")
    		throw("runtime: cannot map pages in arena address space")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  10. 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)
Back to top