Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 343 for Map (0.03 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/types.go

    	}
    
    	m := &argMatcher{t: t, seen: make(map[types.Type]bool)}
    	ok = m.match(typ, true)
    	return m.reason, ok
    }
    
    // argMatcher recursively matches types against the printfArgType t.
    //
    // To short-circuit recursion, it keeps track of types that have already been
    // matched (or are in the process of being matched) via the seen map. Recursion
    // arises from the compound types {map,chan,slice} which may be printed with %d
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. src/internal/fmtsort/sort_test.go

    type sortTest struct {
    	data  any    // Always a map.
    	print string // Printed result using our custom printer.
    }
    
    var sortTests = []sortTest{
    	{
    		map[int]string{7: "bar", -3: "foo"},
    		"-3:foo 7:bar",
    	},
    	{
    		map[uint8]string{7: "bar", 3: "foo"},
    		"3:foo 7:bar",
    	},
    	{
    		map[string]string{"7": "bar", "3": "foo"},
    		"3:foo 7:bar",
    	},
    	{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  3. src/net/http/routing_index.go

    type routingIndex struct {
    	// map from a particular segment position and value to all registered patterns
    	// with that value in that position.
    	// For example, the key {1, "b"} would hold the patterns "/a/b" and "/a/b/c"
    	// but not "/a", "b/a", "/a/c" or "/a/{x}".
    	segments map[routingIndexKey][]*pattern
    	// All patterns that end in a multi wildcard (including trailing slash).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 19 18:35:22 UTC 2023
    - 4K bytes
    - Viewed (0)
  4. src/cmd/internal/objabi/pkgspecial.go

    }
    
    var (
    	pkgSpecials     map[string]PkgSpecial
    	pkgSpecialsOnce sync.Once
    )
    
    // LookupPkgSpecial returns special build properties for the given package path.
    func LookupPkgSpecial(pkgPath string) PkgSpecial {
    	pkgSpecialsOnce.Do(func() {
    		// Construct pkgSpecials from various package lists. This lets us use
    		// more flexible logic, while keeping the final map simple, and avoids
    		// the init-time cost of a map.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 02:32:19 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  5. src/net/hosts.go

    	// FQDN.
    	// For now the key is converted to lower case for convenience.
    	byName map[string]byName
    
    	// Key for the list of host names must be a literal IP address
    	// including IPv6 address with zone identifier.
    	// We don't support old-classful IP address notation.
    	byAddr map[string][]string
    
    	expire time.Time
    	path   string
    	mtime  time.Time
    	size   int64
    }
    
    func readHosts() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 04 07:21:38 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  6. src/internal/types/testdata/check/decls0.go

    		I10
    	}
    	I10 interface {
    		I11
    	}
    	I11 interface {
    		I9
    	}
    
    	C1 chan int
    	C2 <-chan int
    	C3 chan<- C3
    	C4 chan C5
    	C5 chan C6
    	C6 chan C4
    
    	M1 map[Last]string
    	M2 map[string]M2
    
    	Last int
    )
    
    // cycles in function/method declarations
    // (test cases for issues #5217, #25790 and variants)
    func f1(x f1 /* ERROR "not a type" */ ) {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. src/maps/iter_test.go

    			if !yield(i, i+1) {
    				return
    			}
    		}
    	})
    
    	want := map[int]int{
    		1: 1,
    		2: 1,
    	}
    	for i, v := range map[int]int{
    		0: 1,
    		2: 3,
    		4: 5,
    		6: 7,
    		8: 9,
    	} {
    		want[i] = v
    	}
    
    	if !Equal(got, want) {
    		t.Errorf("Insert got: %v, want: %v", got, want)
    	}
    }
    
    func TestCollect(t *testing.T) {
    	m := map[int]int{
    		0: 1,
    		2: 3,
    		4: 5,
    		6: 7,
    		8: 9,
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:44:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/testplugin/testdata/issue62430/main.go

    // license that can be found in the LICENSE file.
    
    // Issue 62430: a program that uses plugins may appear
    // to have no references to an initialized global map variable defined
    // in some stdlib package (ex: unicode), however there
    // may be references to that map var from a plugin that
    // gets loaded.
    
    package main
    
    import (
    	"fmt"
    	"plugin"
    	"unicode"
    )
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 13:18:51 UTC 2023
    - 804 bytes
    - Viewed (0)
  9. test/maplinear.go

    func main() {
    	// NaNs. ~31ms on a 1.6GHz Zeon.
    	checkLinear("NaN", 30000, func(n int) {
    		m := map[float64]int{}
    		nan := math.NaN()
    		for i := 0; i < n; i++ {
    			m[nan] = 1
    		}
    		if len(m) != n {
    			panic("wrong size map after nan insertion")
    		}
    	})
    
    	// ~6ms on a 1.6GHz Zeon.
    	checkLinear("eface", 10000, func(n int) {
    		m := map[interface{}]int{}
    		for i := 0; i < n; i++ {
    			m[i] = 1
    		}
    	})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/mono.go

    //
    // For example, given:
    //
    //	func f[A, B any]() {
    //		type T int
    //		f[T, map[A]B]()
    //	}
    //
    // we construct vertices representing types A, B, and T. Because of
    // declaration "type T int", we construct edges T<-A and T<-B with
    // weight 1; and because of instantiation "f[T, map[A]B]" we construct
    // edges A<-T with weight 0, and B<-A and B<-B with weight 1.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 00:05:29 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top