Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 327 for Map (0.02 sec)

  1. src/go/ast/scope.go

    //
    // Deprecated: use the type checker [go/types] instead; see [Object].
    type Scope struct {
    	Outer   *Scope
    	Objects map[string]*Object
    }
    
    // NewScope creates a new scope nested in the outer scope.
    func NewScope(outer *Scope) *Scope {
    	const n = 4 // initial scope capacity
    	return &Scope{outer, make(map[string]*Object, n)}
    }
    
    // Lookup returns the object with the given name if it is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. src/internal/coverage/encodecounter/encode.go

    // previously supplied to NewCoverageDataWriter. Returns an error
    // if something went wrong somewhere with the write.
    func (cfw *CoverageDataWriter) Write(metaFileHash [16]byte, args map[string]string, visitor CounterVisitor) error {
    	if err := cfw.writeHeader(metaFileHash); err != nil {
    		return err
    	}
    	return cfw.AppendSegment(args, visitor)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/internal/typeparams/free.go

    // NOTE: Adapted from go/types/infer.go. If it is later exported, factor.
    type Free struct {
    	seen map[types.Type]bool
    }
    
    // Has reports whether the specified type has a free type parameter.
    func (w *Free) Has(typ types.Type) (res bool) {
    
    	// detect cycles
    	if x, ok := w.seen[typ]; ok {
    		return x
    	}
    	if w.seen == nil {
    		w.seen = make(map[types.Type]bool)
    	}
    	w.seen[typ] = false
    	defer func() {
    		w.seen[typ] = res
    	}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. src/mime/mediatype.go

    	err = checkMediaTypeDisposition(mediatype)
    	if err != nil {
    		return "", nil, err
    	}
    
    	params = make(map[string]string)
    
    	// Map of base parameter name -> parameter name -> value
    	// for parameters containing a '*' character.
    	// Lazily initialized.
    	var continuation map[string]map[string]string
    
    	v = v[len(base):]
    	for len(v) > 0 {
    		v = strings.TrimLeftFunc(v, unicode.IsSpace)
    		if len(v) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  5. src/encoding/gob/decoder.go

    	buf          decBuffer                               // buffer for more efficient i/o from r
    	wireType     map[typeId]*wireType                    // map from remote ID to local description
    	decoderCache map[reflect.Type]map[typeId]**decEngine // cache of compiled engines
    	ignorerCache map[typeId]**decEngine                  // ditto for ignored objects
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  6. src/go/importer/importer.go

    	switch compiler {
    	case "gc":
    		return &gcimports{
    			fset:     fset,
    			packages: make(map[string]*types.Package),
    			lookup:   lookup,
    		}
    
    	case "gccgo":
    		var inst gccgoimporter.GccgoInstallation
    		if err := inst.InitFromDriver("gccgo"); err != nil {
    			return nil
    		}
    		return &gccgoimports{
    			packages: make(map[string]*types.Package),
    			importer: inst.GetImporter(nil, nil),
    			lookup:   lookup,
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  7. src/cmd/go/scriptconds_test.go

    	"errors"
    	"fmt"
    	"internal/buildcfg"
    	"internal/platform"
    	"internal/testenv"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"runtime"
    	"runtime/debug"
    	"strings"
    	"sync"
    )
    
    func scriptConditions() map[string]script.Cond {
    	conds := scripttest.DefaultConds()
    
    	add := func(name string, cond script.Cond) {
    		if _, ok := conds[name]; ok {
    			panic(fmt.Sprintf("condition %q is already registered", name))
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  8. test/typeparam/issue50485.dir/a.go

    }
    
    func None[T any]() Option[T] {
    	return Option[T]{}
    }
    
    func Ap[T, U any](t Option[Func1[T, U]], a Option[T]) Option[U] {
    	return FlatMap(t, func(f Func1[T, U]) Option[U] {
    		return Map(a, f)
    	})
    }
    
    func Map[T, U any](opt Option[T], f func(v T) U) Option[U] {
    	return FlatMap(opt, func(v T) Option[U] {
    		return Some(f(v))
    	})
    }
    
    func FlatMap[T, U any](opt Option[T], fn func(v T) Option[U]) Option[U] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. src/net/http/http_test.go

    	t.Parallel()
    	goBin := testenv.GoToolPath(t)
    	out, err := testenv.Command(t, goBin, "tool", "nm", goBin).CombinedOutput()
    	if err != nil {
    		t.Fatalf("go tool nm: %v: %s", err, out)
    	}
    	wantSym := map[string]bool{
    		// Verify these exist: (sanity checking this test)
    		"net/http.(*Client).do":           true,
    		"net/http.(*Transport).RoundTrip": true,
    
    		// Verify these don't exist:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 18:18:19 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  10. src/runtime/pprof/proto_windows.go

    	if err != nil {
    		// pprof expects a map entry, so fake one, when we haven't added anything yet.
    		b.addMappingEntry(0, 0, 0, "", "", true)
    		return
    	}
    	defer func() { _ = syscall.CloseHandle(snap) }()
    
    	var module windows.ModuleEntry32
    	module.Size = uint32(windows.SizeofModuleEntry32)
    	err = windows.Module32First(snap, &module)
    	if err != nil {
    		// pprof expects a map entry, so fake one, when we haven't added anything yet.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 16:07:59 UTC 2023
    - 2.2K bytes
    - Viewed (0)
Back to top