Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 507 for Map (0.08 sec)

  1. src/hash/maphash/maphash_test.go

    	"hash"
    	"testing"
    )
    
    func TestUnseededHash(t *testing.T) {
    	m := map[uint64]struct{}{}
    	for i := 0; i < 1000; i++ {
    		h := new(Hash)
    		m[h.Sum64()] = struct{}{}
    	}
    	if len(m) < 900 {
    		t.Errorf("empty hash not sufficiently random: got %d, want 1000", len(m))
    	}
    }
    
    func TestSeededHash(t *testing.T) {
    	s := MakeSeed()
    	m := map[uint64]struct{}{}
    	for i := 0; i < 1000; i++ {
    		h := new(Hash)
    		h.SetSeed(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  2. src/net/http/servemux121.go

    		use121 = true
    		httpmuxgo121.IncNonDefault()
    	}
    }
    
    // serveMux121 holds the state of a ServeMux needed for Go 1.21 behavior.
    type serveMux121 struct {
    	mu    sync.RWMutex
    	m     map[string]muxEntry
    	es    []muxEntry // slice of entries sorted from longest to shortest.
    	hosts bool       // whether any patterns contain hostnames
    }
    
    type muxEntry struct {
    	h       Handler
    	pattern string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:40:38 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/noder/posmap.go

    package noder
    
    import (
    	"cmd/compile/internal/base"
    	"cmd/compile/internal/syntax"
    	"cmd/internal/src"
    )
    
    // A posMap handles mapping from syntax.Pos to src.XPos.
    type posMap struct {
    	bases map[*syntax.PosBase]*src.PosBase
    	cache struct {
    		last *syntax.PosBase
    		base *src.PosBase
    	}
    }
    
    type poser interface{ Pos() syntax.Pos }
    type ender interface{ End() syntax.Pos }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 27 03:43:35 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/text/internal/match.go

    func NewInheritanceMatcher(t []language.Tag) *InheritanceMatcher {
    	tags := &InheritanceMatcher{make(map[language.Tag]int)}
    	for i, tag := range t {
    		ct, err := language.All.Canonicalize(tag)
    		if err != nil {
    			ct = tag
    		}
    		tags.index[ct] = i
    	}
    	return tags
    }
    
    type InheritanceMatcher struct {
    	index map[language.Tag]int
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  5. src/net/http/mapping_test.go

    					entries = append(entries, entry[string, any]{c, nil})
    				}
    				b.ResetTimer()
    				for i := 0; i < b.N; i++ {
    					findChildLinear(key, entries)
    				}
    			})
    			b.Run("rep=map", func(b *testing.B) {
    				m := map[string]any{}
    				for _, c := range list {
    					m[c] = nil
    				}
    				var x any
    				b.ResetTimer()
    				for i := 0; i < b.N; i++ {
    					x = m[key]
    				}
    				_ = x
    			})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 17:47:07 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  6. src/plugin/plugin_dlopen.go

    	// This function can be called from the init function of a plugin.
    	// Drop a placeholder in the map so subsequent opens can wait on it.
    	p := &Plugin{
    		pluginpath: pluginpath,
    		loaded:     make(chan struct{}),
    	}
    	plugins[filepath] = p
    	pluginsMu.Unlock()
    
    	doInit(initTasks)
    
    	// Fill out the value of each plugin symbol.
    	updatedSyms := map[string]any{}
    	for symName, sym := range syms {
    		isFunc := symName[0] == '.'
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 16:55:22 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  7. test/fixedbugs/issue66096.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    type Message struct {
    	Header map[string][]string
    }
    
    func f() {
    	m := Message{Header: map[string][]string{}}
    	m.Header[""] = append([]string(m.Header[""]), "")
    	_ = m
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 352 bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/self_test.go

    		}
    		var info *Info
    		if writeInfo {
    			info = &Info{
    				Types:      make(map[syntax.Expr]TypeAndValue),
    				Defs:       make(map[*syntax.Name]Object),
    				Uses:       make(map[*syntax.Name]Object),
    				Implicits:  make(map[syntax.Node]Object),
    				Selections: make(map[*syntax.SelectorExpr]*Selection),
    				Scopes:     make(map[syntax.Node]*Scope),
    			}
    		}
    		if _, err := conf.Check(path, files, info); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:39:00 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/runtime/covermeta.go

    	id := rtcov.AddMeta(p, dlen, hash, pkgpath, pkgid, cmode, cgran)
    	if id == 0 {
    		throw("runtime.addCovMeta: coverage package map collision")
    	}
    	return id
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 603 bytes
    - Viewed (0)
  10. src/internal/types/testdata/fixedbugs/issue39755.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    func _[T interface{~map[string]int}](x T) {
    	_ = x == nil
    }
    
    // simplified test case from issue
    
    type PathParamsConstraint interface {
            ~map[string]string | ~[]struct{key, value string}
    }
    
    type PathParams[T PathParamsConstraint] struct {
    	t T
    }
    
    func (pp *PathParams[T]) IsNil() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 507 bytes
    - Viewed (0)
Back to top