MCPcopy
hub / github.com/duke-git/lancet / ExampleOrderedMap_Get

Function ExampleOrderedMap_Get

maputil/map_example_test.go:580–596  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

578}
579
580func ExampleOrderedMap_Get() {
581 om := NewOrderedMap[string, int]()
582
583 om.Set("a", 1)
584 om.Set("b", 2)
585 om.Set("c", 3)
586
587 val1, ok := om.Get("a")
588 fmt.Println(val1, ok)
589
590 val2, ok := om.Get("d")
591 fmt.Println(val2, ok)
592
593 // Output:
594 // 1 true
595 // 0 false
596}
597
598func ExampleOrderedMap_Front() {
599 om := NewOrderedMap[string, int]()

Callers

nothing calls this directly

Calls 3

NewOrderedMapFunction · 0.85
SetMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…