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

Function ExampleOrderedMap_Back

maputil/map_example_test.go:614–628  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

612}
613
614func ExampleOrderedMap_Back() {
615 om := NewOrderedMap[string, int]()
616
617 om.Set("a", 1)
618 om.Set("b", 2)
619 om.Set("c", 3)
620
621 backElement, ok := om.Back()
622 fmt.Println(backElement)
623 fmt.Println(ok)
624
625 // Output:
626 // {c 3}
627 // true
628}
629
630func ExampleOrderedMap_Delete() {
631 om := NewOrderedMap[string, int]()

Callers

nothing calls this directly

Calls 3

NewOrderedMapFunction · 0.85
SetMethod · 0.65
BackMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…