MCPcopy Create free account
hub / github.com/GuyARoss/orbit / Add

Method Add

pkg/allocated_stack/allocated_stack.go:16–23  ·  view source on GitHub ↗
(v string)

Source from the content-addressed store, hash-verified

14}
15
16func (s *Stack) Add(v string) {
17 if s.l.Len() > int(s.size)-1 {
18 e := s.l.Back()
19 s.l.Remove(e)
20 }
21
22 s.l.PushFront(v)
23}
24
25func (s *Stack) Arr() []string {
26 final := make([]string, 0)

Callers 1

TestStackFunction · 0.45

Calls 1

LenMethod · 0.45

Tested by 1

TestStackFunction · 0.36