- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 523 for Map (0.1 sec)
-
src/internal/types/errors/generrordocs.go
if err != nil { log.Fatalf("ParseFile failed: %s", err) } conf := Config{Importer: importer.Default()} info := &Info{ Types: make(map[ast.Expr]TypeAndValue), Defs: make(map[*ast.Ident]Object), Uses: make(map[*ast.Ident]Object), } _, err = conf.Check("types", fset, []*ast.File{file}, info) if err != nil { log.Fatalf("Check failed: %s", err) } for _, decl := range file.Decls {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 03:14:42 UTC 2023 - 3K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue50755.go
// during constraint type inference. func f4[M4 map[K4]int, K4 comparable](m4 M4) {} func f5[M5 map[K5]int, K5 comparable](m5 M5) { f4(m5) } // test case from issue func Copy[MC ~map[KC]VC, KC comparable, VC any](dst, src MC) { for k, v := range src { dst[k] = v } } func Merge[MM ~map[KM]VM, KM comparable, VM any](ms ...MM) MM { result := MM{} for _, m := range ms { Copy(result, m) } return result
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 1K bytes - Viewed (0) -
src/sync/map_reference_test.go
} func (m *DeepCopyMap) Range(f func(key, value any) (shouldContinue bool)) { clean, _ := m.clean.Load().(map[any]any) for k, v := range clean { if !f(k, v) { break } } } func (m *DeepCopyMap) dirty() map[any]any { clean, _ := m.clean.Load().(map[any]any) dirty := make(map[any]any, len(clean)+1) for k, v := range clean { dirty[k] = v } return dirty }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 01 15:34:22 UTC 2024 - 5.6K bytes - Viewed (0) -
src/cmd/internal/pgo/pgo.go
CalleeName string CallSiteOffset int // Line offset from function start line. } // NamedEdgeMap contains all unique call edges in the profile and their // edge weight. type NamedEdgeMap struct { Weight map[NamedCallEdge]int64 // ByWeight lists all keys in Weight, sorted by edge weight from // highest to lowest. ByWeight []NamedCallEdge } func emptyProfile() *Profile {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 20:20:01 UTC 2024 - 1.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/example_test.go
return x } return fib(x-1) - fib(x-2) }` // Type-check the package. // We create an empty map for each kind of input // we're interested in, and Check populates them. info := types2.Info{ Types: make(map[syntax.Expr]types2.TypeAndValue), Defs: make(map[*syntax.Name]types2.Object), Uses: make(map[*syntax.Name]types2.Object), } pkg := mustTypecheck(input, nil, &info)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 28 17:58:07 UTC 2023 - 7.1K bytes - Viewed (0) -
src/cmd/go/internal/test/flagdefs_test.go
"testing" ) func TestMain(m *testing.M) { cfg.SetGOROOT(testenv.GOROOT(nil), false) os.Exit(m.Run()) } func TestPassFlagToTest(t *testing.T) { wantNames := genflags.ShortTestFlags() missing := map[string]bool{} for _, name := range wantNames { if !passFlagToTest[name] { missing[name] = true } } if len(missing) > 0 { t.Errorf("passFlagToTest is missing entries: %v", missing) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 09 13:37:58 UTC 2023 - 1.6K bytes - Viewed (0) -
src/os/signal/signal.go
import ( "context" "os" "sync" ) var handlers struct { sync.Mutex // Map a channel to the signals that should be sent to it. m map[chan<- os.Signal]*handler // Map a signal to the number of channels receiving it. ref [numSig]int64 // Map channels to signals while the channel is being stopped. // Not a map because entries live here only very briefly.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:12 UTC 2024 - 8.3K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue40789.go
// license that can be found in the LICENSE file. package main import "fmt" func main() { m := map[string]int{ "a": 6, "b": 7, } fmt.Println(copyMap[map[string]int, string, int](m)) } type Map[K comparable, V any] interface { map[K] V } func copyMap[M Map[K, V], K comparable, V any](m M) M { m1 := make(M) for k, v := range m { m1[k] = v } return m1 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 614 bytes - Viewed (0) -
src/mime/multipart/formdata.go
multipartmaxparts = godebug.New("multipartmaxparts") ) func (r *Reader) readForm(maxMemory int64) (_ *Form, err error) { form := &Form{make(map[string][]string), make(map[string][]*FileHeader)} var ( file *os.File fileOff int64 ) numDiskFiles := 0 combineFiles := true if multipartfiles.Value() == "distinct" { combineFiles = false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 16:12:35 UTC 2024 - 7.7K bytes - Viewed (0) -
src/go/token/token.go
ELSE: "else", FALLTHROUGH: "fallthrough", FOR: "for", FUNC: "func", GO: "go", GOTO: "goto", IF: "if", IMPORT: "import", INTERFACE: "interface", MAP: "map", PACKAGE: "package", RANGE: "range", RETURN: "return", SELECT: "select", STRUCT: "struct", SWITCH: "switch", TYPE: "type", VAR: "var", TILDE: "~", }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 6.4K bytes - Viewed (0)