Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 110 for Map (0.02 sec)

  1. src/internal/types/testdata/check/decls0.go

    		I10
    	}
    	I10 interface {
    		I11
    	}
    	I11 interface {
    		I9
    	}
    
    	C1 chan int
    	C2 <-chan int
    	C3 chan<- C3
    	C4 chan C5
    	C5 chan C6
    	C6 chan C4
    
    	M1 map[Last]string
    	M2 map[string]M2
    
    	Last int
    )
    
    // cycles in function/method declarations
    // (test cases for issues #5217, #25790 and variants)
    func f1(x f1 /* ERROR "not a type" */ ) {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. 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)
  3. src/cmd/trace/goroutinegen.go

    	globalRangeGenerator
    	globalMetricGenerator
    	stackSampleGenerator[trace.GoID]
    	logEventGenerator[trace.GoID]
    
    	gStates map[trace.GoID]*gState[trace.GoID]
    	focus   trace.GoID
    	filter  map[trace.GoID]struct{}
    }
    
    func newGoroutineGenerator(ctx *traceContext, focus trace.GoID, filter map[trace.GoID]struct{}) *goroutineGenerator {
    	gg := new(goroutineGenerator)
    	rg := func(ev *trace.Event) trace.GoID {
    		return ev.Goroutine()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. src/reflect/iter.go

    // If v's kind is Pointer, the pointer element type must have kind Array.
    // Otherwise v's kind must be Int, Int8, Int16, Int32, Int64,
    // Uint, Uint8, Uint16, Uint32, Uint64, Uintptr,
    // Array, Chan, Map, Slice, or String.
    func (v Value) Seq() iter.Seq[Value] {
    	if canRangeFunc(v.typ()) {
    		return func(yield func(Value) bool) {
    			rf := MakeFunc(v.Type().In(0), func(in []Value) []Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 13:40:11 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. 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)
  6. src/cmd/trace/jsontrace_test.go

    // "blocked" argument is equal to blocked.
    func filterBlocked(blocked string) eventFilterFn {
    	return func(e *format.Event, _ *format.Data) bool {
    		m, ok := e.Arg.(map[string]any)
    		if !ok {
    			return false
    		}
    		return m["blocked"] == blocked
    	}
    }
    
    // filterStackRootFunc returns an event filter that returns true if the function
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. src/internal/types/testdata/fixedbugs/issue66878.go

    package p
    
    func _[T bool](ch chan T) {
    	var _, _ T = <-ch
    }
    
    // offending code snippets from issue
    
    func _[T ~bool](ch <-chan T) {
    	var x, ok T = <-ch
    	println(x, ok)
    }
    
    func _[T ~bool](m map[int]T) {
    	var x, ok T = m[0]
    	println(x, ok)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 17:42:47 UTC 2024
    - 399 bytes
    - Viewed (0)
  8. src/net/http/clone.go

    //
    //go:linkname cloneMultipartForm
    func cloneMultipartForm(f *multipart.Form) *multipart.Form {
    	if f == nil {
    		return nil
    	}
    	f2 := &multipart.Form{
    		Value: (map[string][]string)(Header(f.Value).Clone()),
    	}
    	if f.File != nil {
    		m := make(map[string][]*multipart.FileHeader)
    		for k, vv := range f.File {
    			vv2 := make([]*multipart.FileHeader, len(vv))
    			for i, v := range vv {
    				vv2[i] = cloneMultipartFileHeader(v)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. src/internal/coverage/cformat/format.go

    )
    
    type Formatter struct {
    	// Maps import path to package state.
    	pm map[string]*pstate
    	// Records current package being visited.
    	pkg string
    	// Pointer to current package state.
    	p *pstate
    	// Counter mode.
    	cm coverage.CounterMode
    }
    
    // pstate records package-level coverage data state:
    // - a table of functions (file/fname/literal)
    // - a map recording the index/ID of each func encountered so far
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  10. src/reflect/iter_test.go

    // license that can be found in the LICENSE file.
    
    package reflect_test
    
    import (
    	"iter"
    	"maps"
    	. "reflect"
    	"testing"
    )
    
    func TestValueSeq(t *testing.T) {
    	m := map[string]int{
    		"1": 1,
    		"2": 2,
    		"3": 3,
    		"4": 4,
    	}
    	c := make(chan int, 3)
    	for i := range 3 {
    		c <- i
    	}
    	close(c)
    	tests := []struct {
    		name  string
    		val   Value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 14:27:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
Back to top