Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 642 for Map (0.02 sec)

  1. src/maps/iter.go

    // to be the same from one call to the next.
    func Values[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[V] {
    	return func(yield func(V) bool) {
    		for _, v := range m {
    			if !yield(v) {
    				return
    			}
    		}
    	}
    }
    
    // Insert adds the key-value pairs from seq to m.
    // If a key in seq already exists in m, its value will be overwritten.
    func Insert[Map ~map[K]V, K comparable, V any](m Map, seq iter.Seq2[K, V]) {
    	for k, v := range seq {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 13:41:45 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. src/text/template/template.go

    	return t
    }
    
    // Funcs adds the elements of the argument map to the template's function map.
    // It must be called before the template is parsed.
    // It panics if a value in the map is not a function with appropriate return
    // type or if the name cannot be used syntactically as a function in a template.
    // It is legal to overwrite elements of the map. The return value is the template,
    // so calls can be chained.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. test/typeparam/issue48185b.dir/a.go

    package a
    
    import (
    	"reflect"
    	"sync"
    )
    
    type addressableValue struct{ reflect.Value }
    
    type arshalers[Options, Coder any] struct {
    	fncVals  []typedArshaler[Options, Coder]
    	fncCache sync.Map // map[reflect.Type]unmarshaler
    }
    type typedArshaler[Options, Coder any] struct {
    	typ reflect.Type
    	fnc func(Options, *Coder, addressableValue) error
    }
    
    type UnmarshalOptions1 struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 07 20:37:05 UTC 2021
    - 1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types/pkg.go

    		// instantiations.
    		p.Prefix = path
    	} else {
    		p.Prefix = objabi.PathToPrefix(path)
    	}
    	p.Syms = make(map[string]*Sym)
    	pkgMap[path] = p
    
    	return p
    }
    
    func PkgMap() map[string]*Pkg {
    	return pkgMap
    }
    
    var nopkg = &Pkg{
    	Syms: make(map[string]*Sym),
    }
    
    func (pkg *Pkg) Lookup(name string) *Sym {
    	s, _ := pkg.LookupOK(name)
    	return s
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 16:28:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. src/cmd/vendor/github.com/google/pprof/profile/prune.go

    func (p *Profile) Prune(dropRx, keepRx *regexp.Regexp) {
    	prune := make(map[uint64]bool)
    	pruneBeneath := make(map[uint64]bool)
    
    	// simplifyFunc can be expensive, so cache results.
    	// Note that the same function name can be encountered many times due
    	// different lines and addresses in the same function.
    	pruneCache := map[string]bool{} // Map from function to whether or not to prune
    	pruneFromHere := func(s string) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 22 18:58:12 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  6. test/typeparam/orderedmap.go

    // Package orderedmap provides an ordered map, implemented as a binary tree.
    package main
    
    import (
    	"bytes"
    	"context"
    	"fmt"
    	"runtime"
    )
    
    type Ordered interface {
    	~int | ~int8 | ~int16 | ~int32 | ~int64 |
    		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
    		~float32 | ~float64 |
    		~string
    }
    
    // _Map is an ordered map.
    type _Map[K, V any] struct {
    	root    *node[K, V]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssagen/nowb.go

    	// get back to the ODCLFUNCs.
    	symToFunc := make(map[*obj.LSym]*ir.Func)
    	// funcs records the back-edges of the BFS call graph walk. It
    	// maps from the ODCLFUNC of each function that must not have
    	// write barriers to the call that inhibits them. Functions
    	// that are directly marked go:nowritebarrierrec are in this
    	// map with a zero-valued nowritebarrierrecCall. This also
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 17:29:46 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/validate.go

    func Validate(analyzers []*Analyzer) error {
    	// Map each fact type to its sole generating analyzer.
    	factTypes := make(map[reflect.Type]*Analyzer)
    
    	// Traverse the Requires graph, depth first.
    	const (
    		white = iota
    		grey
    		black
    		finished
    	)
    	color := make(map[*Analyzer]uint8)
    	var visit func(a *Analyzer) error
    	visit = func(a *Analyzer) error {
    		if a == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 21:52:54 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. test/fixedbugs/issue63505.go

    package main
    
    type explainer struct {
    	m map[string]string
    }
    
    func init() {
    	RegisterExplainer(newExplainer())
    }
    
    type Explainer interface {
    	Name() string
    	Map() map[string]string
    }
    
    func (e explainer) Name() string {
    	return "HelloWorldExplainer"
    }
    
    func (e explainer) Map() map[string]string {
    	return e.m
    }
    
    //go:noinline
    func newExplainer() explainer {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 736 bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/context.go

    // The use of a shared context does not guarantee that identical instances are
    // deduplicated in all cases.
    type Context struct {
    	mu        sync.Mutex
    	typeMap   map[string][]ctxtEntry // type hash -> instances entries
    	nextID    int                    // next unique ID
    	originIDs map[Type]int           // origin type -> unique ID
    }
    
    type ctxtEntry struct {
    	orig     Type
    	targs    []Type
    	instance Type // = orig[targs]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:29:21 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top