Search Options

Results per page
Sort
Preferred Languages
Advance

Results 211 - 220 of 336 for Map (0.75 sec)

  1. src/net/port_unix.go

    		port, j, ok := dtoi(portnet)
    		if !ok || port <= 0 || j >= len(portnet) || portnet[j] != '/' {
    			continue
    		}
    		netw := portnet[j+1:] // "tcp"
    		m, ok1 := services[netw]
    		if !ok1 {
    			m = make(map[string]int)
    			services[netw] = m
    		}
    		for i := 0; i < len(f); i++ {
    			if i != 1 { // f[1] was port/net
    				m[f[i]] = port
    			}
    		}
    	}
    }
    
    // goLookupPort is the native Go implementation of LookupPort.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. src/net/lookup_unix.go

    //go:build unix || js || wasip1
    
    package net
    
    import (
    	"context"
    	"internal/bytealg"
    	"sync"
    )
    
    var onceReadProtocols sync.Once
    
    // readProtocols loads contents of /etc/protocols into protocols map
    // for quick access.
    func readProtocols() {
    	file, err := open("/etc/protocols")
    	if err != nil {
    		return
    	}
    	defer file.close()
    
    	for line, ok := file.readLine(); ok; line, ok = file.readLine() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  3. src/runtime/pprof/label_test.go

    	}
    }
    
    func TestLabelMapStringer(t *testing.T) {
    	for _, tbl := range []struct {
    		m        labelMap
    		expected string
    	}{
    		{
    			m: labelMap{
    				// empty map
    			},
    			expected: "{}",
    		}, {
    			m: labelMap{
    				"foo": "bar",
    			},
    			expected: `{"foo":"bar"}`,
    		}, {
    			m: labelMap{
    				"foo":             "bar",
    				"key1":            "value1",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  4. src/encoding/json/scanner_test.go

    	x := make([]any, f)
    	for i := range x {
    		x[i] = genValue(((i+1)*n)/f - (i*n)/f)
    	}
    	return x
    }
    
    func genMap(n int) map[string]any {
    	f := int(math.Abs(rand.NormFloat64()) * math.Min(10, float64(n/2)))
    	if f > n {
    		f = n
    	}
    	if n > 0 && f == 0 {
    		f = 1
    	}
    	x := make(map[string]any)
    	for i := 0; i < f; i++ {
    		x[genString(10)] = genValue(((i+1)*n)/f - (i*n)/f)
    	}
    	return x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 16:00:37 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  5. src/go/types/eval_test.go

    		expr, err := parser.ParseExprFrom(fset, "eval", str, 0)
    		if err != nil {
    			return nil, err
    		}
    
    		info := &Info{
    			Uses:       make(map[*ast.Ident]Object),
    			Selections: make(map[*ast.SelectorExpr]*Selection),
    		}
    		if err := CheckExpr(fset, pkg, pos, expr, info); err != nil {
    			return nil, fmt.Errorf("CheckExpr(%q) failed: %s", str, err)
    		}
    		switch expr := expr.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 19:56:15 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. src/encoding/xml/typeinfo.go

    	fAttr
    	fCDATA
    	fCharData
    	fInnerXML
    	fComment
    	fAny
    
    	fOmitEmpty
    
    	fMode = fElement | fAttr | fCDATA | fCharData | fInnerXML | fComment | fAny
    
    	xmlName = "XMLName"
    )
    
    var tinfoMap sync.Map // map[reflect.Type]*typeInfo
    
    var nameType = reflect.TypeFor[Name]()
    
    // getTypeInfo returns the typeInfo structure with details necessary
    // for marshaling and unmarshaling typ.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:23:29 UTC 2023
    - 9.6K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt

    # and -fno-canonical-systemd-headers are permitted for internal linking.
    env CGO_CFLAGS=-fdebug-prefix-map=old=/tmp/new
    go build -x -n -o dummy.exe ./usesInternalCgo
    ! stderr preferlinkext
    env CGO_CFLAGS=-ffile-prefix-map=/Users/someone/_11233/things=new
    go build -x -n -o dummy.exe ./usesInternalCgo
    ! stderr preferlinkext
    env CGO_CFLAGS=-no-canonical-prefixes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 25 18:16:01 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  8. src/cmd/link/internal/dwtest/dwtest.go

    	dies        []*dwarf.Entry
    	idxByOffset map[dwarf.Offset]int
    	kids        map[int][]int
    	parent      map[int]int
    	byname      map[string][]int
    }
    
    // Populate the Examiner using the DIEs read from rdr.
    func (ex *Examiner) Populate(rdr *dwarf.Reader) error {
    	ex.idxByOffset = make(map[dwarf.Offset]int)
    	ex.kids = make(map[int][]int)
    	ex.parent = make(map[int]int)
    	ex.byname = make(map[string][]int)
    	var nesting []int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 15:22:18 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  9. src/runtime/runtime-lldb_test.go

    		} else if !strings.Contains(string(out), "_developer") {
    			t.Skip("Not in _developer group")
    		}
    	}
    }
    
    const lldbHelloSource = `
    package main
    import "fmt"
    func main() {
    	mapvar := make(map[string]string,5)
    	mapvar["abc"] = "def"
    	mapvar["ghi"] = "jkl"
    	intvar := 42
    	ptrvar := &intvar
    	fmt.Println("hi") // line 10
    	_ = ptrvar
    }
    `
    
    const lldbScriptSource = `
    import sys
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. src/plugin/plugin.go

    package plugin
    
    // Plugin is a loaded Go plugin.
    type Plugin struct {
    	pluginpath string
    	err        string        // set if plugin failed to load
    	loaded     chan struct{} // closed when loaded
    	syms       map[string]any
    }
    
    // Open opens a Go plugin.
    // If a path has already been opened, then the existing *[Plugin] is returned.
    // It is safe for concurrent use by multiple goroutines.
    func Open(path string) (*Plugin, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 19:46:10 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top