Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 341 for Map (0.04 sec)

  1. src/cmd/go/scriptcmds_test.go

    	"cmd/go/internal/script/scripttest"
    	"cmd/go/internal/work"
    	"errors"
    	"fmt"
    	"os"
    	"os/exec"
    	"strings"
    	"sync"
    	"time"
    )
    
    func scriptCommands(interrupt os.Signal, waitDelay time.Duration) map[string]script.Cmd {
    	cmds := scripttest.DefaultCmds()
    
    	// Customize the "exec" interrupt signal and grace period.
    	var cancel func(cmd *exec.Cmd) error
    	if interrupt != nil {
    		cancel = func(cmd *exec.Cmd) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 18:33:17 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. src/net/http/cgi/child.go

    	}
    	return r, nil
    }
    
    func envMap(env []string) map[string]string {
    	m := make(map[string]string)
    	for _, kv := range env {
    		if k, v, ok := strings.Cut(kv, "="); ok {
    			m[k] = v
    		}
    	}
    	return m
    }
    
    // RequestFromMap creates an [http.Request] from CGI variables.
    // The returned Request's Body field is not populated.
    func RequestFromMap(params map[string]string) (*http.Request, error) {
    	r := new(http.Request)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. src/runtime/pprof/protomem_test.go

    				{ID: 2, Mapping: map2, Address: addr2},
    			},
    			NumLabel: map[string][]int64{"bytes": {1024}},
    		},
    		{
    			Value: []int64{1, 829411, 1, 829411},
    			Location: []*profile.Location{
    				{ID: 3, Mapping: map2, Address: addr2 + 1},
    				{ID: 4, Mapping: map2, Address: addr2 + 2},
    			},
    			NumLabel: map[string][]int64{"bytes": {512 * 1024}},
    		},
    		{
    			Value: []int64{1, 829411, 0, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:45 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. 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)
  5. src/container/heap/example_pq_test.go

    }
    
    // This example creates a PriorityQueue with some items, adds and manipulates an item,
    // and then removes the items in priority order.
    func Example_priorityQueue() {
    	// Some items and their priorities.
    	items := map[string]int{
    		"banana": 3, "apple": 2, "pear": 4,
    	}
    
    	// Create a priority queue, put the items in it, and
    	// establish the priority queue (heap) invariants.
    	pq := make(PriorityQueue, len(items))
    	i := 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:27:36 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modload/list.go

    func ListModules(ctx context.Context, args []string, mode ListMode, reuseFile string) ([]*modinfo.ModulePublic, error) {
    	var reuse map[module.Version]*modinfo.ModulePublic
    	if reuseFile != "" {
    		data, err := os.ReadFile(reuseFile)
    		if err != nil {
    			return nil, err
    		}
    		dec := json.NewDecoder(bytes.NewReader(data))
    		reuse = make(map[module.Version]*modinfo.ModulePublic)
    		for {
    			var m modinfo.ModulePublic
    			if err := dec.Decode(&m); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 22:43:50 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  7. src/encoding/gob/encoder.go

    // goroutines.
    type Encoder struct {
    	mutex      sync.Mutex              // each item must be sent atomically
    	w          []io.Writer             // where to send the data
    	sent       map[reflect.Type]typeId // which types we've already sent
    	countState *encoderState           // stage for writing counts
    	freeList   *encoderState           // list of free encoderStates; avoids reallocation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  8. src/encoding/pem/pem.go

    //	-----END Type-----
    //
    // where [Block.Headers] is a possibly empty sequence of Key: Value lines.
    type Block struct {
    	Type    string            // The type, taken from the preamble (i.e. "RSA PRIVATE KEY").
    	Headers map[string]string // Optional headers.
    	Bytes   []byte            // The decoded bytes of the contents. Typically a DER encoded ASN.1 structure.
    }
    
    // getLine results the first \r\n or \n delineated line from the given byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. src/net/resolverdialfunc_test.go

    				t.Logf("Header: %+v for %q (type=%v, class=%v)", h,
    					q.Name.String(), q.Type, q.Class)
    			},
    			// TODO: add test without HandleA* hooks specified at all, that Go
    			// doesn't issue retries; map to something terminal.
    			HandleA: func(w AWriter, name string) error {
    				w.AddIP([4]byte{1, 2, 3, 4})
    				w.AddIP([4]byte{5, 6, 7, 8})
    				return nil
    			},
    			HandleAAAA: func(w AAAAWriter, name string) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  10. 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)
Back to top