Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 642 for Map (0.04 sec)

  1. src/net/rpc/jsonrpc/all_test.go

    	go ServeConn(srv)
    
    	client := NewClient(cli)
    	defer client.Close()
    
    	// Map
    	arg := 7
    	replyMap := map[int]int{}
    	err := client.Call("BuiltinTypes.Map", arg, &replyMap)
    	if err != nil {
    		t.Errorf("Map: expected no error but got string %q", err.Error())
    	}
    	if replyMap[arg] != arg {
    		t.Errorf("Map: expected %d got %d", arg, replyMap[arg])
    	}
    
    	// Slice
    	replySlice := []int{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:09:53 UTC 2022
    - 7.8K bytes
    - Viewed (0)
  2. src/mime/type_windows.go

    		if name == ".js" && (v == "text/plain" || v == "text/plain; charset=utf-8") {
    			continue
    		}
    
    		setExtensionType(name, v)
    	}
    }
    
    func initMimeForTests() map[string]string {
    	return map[string]string{
    		".PnG": "image/png",
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 28 20:07:28 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  3. src/internal/types/testdata/fixedbugs/issue61879.go

    		args: args,
    	}
    }
    
    func (k *ImplA[T]) setData(data string) InterfaceA[T] {
    	k.data = data
    	return k
    }
    
    func Foo[M ~map[InterfaceA[T]]V, T comparable, V any](m M) {
    	// DO SOMETHING HERE
    	return
    }
    
    func Bar() {
    	keys := make([]InterfaceA[int], 0, 10)
    	m := make(map[InterfaceA[int]]int)
    	for i := 0; i < 10; i++ {
    		keys = append(keys, NewInterfaceA[int](i))
    		m[keys[i]] = i
    	}
    
    	Foo(m) // panic here
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 19:42:56 UTC 2023
    - 1K bytes
    - Viewed (0)
  4. src/mime/type.go

    	"sync"
    )
    
    var (
    	mimeTypes      sync.Map // map[string]string; ".Z" => "application/x-compress"
    	mimeTypesLower sync.Map // map[string]string; ".z" => "application/x-compress"
    
    	// extensions maps from MIME type to list of lowercase file
    	// extensions: "image/jpeg" => [".jpg", ".jpeg"]
    	extensionsMu sync.Mutex // Guards stores (but not loads) on extensions.
    	extensions   sync.Map   // map[string][]string; slice values are append-only.
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5K bytes
    - Viewed (0)
  5. src/net/http/header_test.go

    			"Expires":          {"-1"},
    			"Content-Length":   {"0"},
    			"Content-Encoding": {"gzip"},
    		},
    		map[string]bool{"Content-Length": true},
    		"Content-Encoding: gzip\r\nExpires: -1\r\n",
    	},
    	{
    		Header{
    			"Expires":          {"-1"},
    			"Content-Length":   {"0", "1", "2"},
    			"Content-Encoding": {"gzip"},
    		},
    		map[string]bool{"Content-Length": true},
    		"Content-Encoding: gzip\r\nExpires: -1\r\n",
    	},
    	{
    		Header{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:07:32 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testplugin/testdata/issue44956/base/base.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package base
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 205 bytes
    - Viewed (0)
  7. src/cmd/internal/obj/line_test.go

    package obj
    
    import (
    	"cmd/internal/src"
    	"fmt"
    	"testing"
    )
    
    func TestGetFileSymbolAndLine(t *testing.T) {
    	ctxt := new(Link)
    	ctxt.hash = make(map[string]*LSym)
    	ctxt.statichash = make(map[string]*LSym)
    
    	afile := src.NewFileBase("a.go", "a.go")
    	bfile := src.NewFileBase("b.go", "/foo/bar/b.go")
    	lfile := src.NewLinePragmaBase(src.MakePos(afile, 8, 1), "linedir", "linedir", 100, 1)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:52:41 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. src/go/types/objset.go

    // object name.
    
    package types
    
    // An objset is a set of objects identified by their unique id.
    // The zero value for objset is a ready-to-use empty objset.
    type objset map[string]Object // initialized lazily
    
    // insert attempts to insert an object obj into objset s.
    // If s already contains an alternative object alt with
    // the same name, insert leaves s unchanged and returns alt.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 1K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go

    func localFunctionDecls(info *types.Info, files []*ast.File) func(*types.Func) *ast.FuncDecl {
    	var fnDecls map[*types.Func]*ast.FuncDecl // computed lazily
    	return func(f *types.Func) *ast.FuncDecl {
    		if f != nil && fnDecls == nil {
    			fnDecls = make(map[*types.Func]*ast.FuncDecl)
    			for _, file := range files {
    				for _, decl := range file.Decls {
    					if fnDecl, ok := decl.(*ast.FuncDecl); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  10. src/go/ast/resolve.go

    	return false
    }
    
    // An Importer resolves import paths to package Objects.
    // The imports map records the packages already imported,
    // indexed by package id (canonical import path).
    // An Importer must determine the canonical import path and
    // check the map to see if it is already present in the imports map.
    // If so, the Importer can return the map entry. Otherwise, the
    // Importer should load the package data for the given path into
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 5.4K bytes
    - Viewed (0)
Back to top