MCPcopy Create free account
hub / github.com/crossoverJie/gscript / Push

Method Push

stack/stack.go:24–26  ·  view source on GitHub ↗

Push a new value onto the Stack

(val interface{})

Source from the content-addressed store, hash-verified

22
23// Push a new value onto the Stack
24func (s *Stack) Push(val interface{}) {
25 *s = append(*s, val) // Simply append the new value to the end of the Stack
26}
27
28// Pop Remove and return top element of Stack. Return false if Stack is empty.
29func (s *Stack) Pop() interface{} {

Callers 5

initClassObjectMethod · 0.95
TestStack_PeekFunction · 0.95
TestStack_GetFunction · 0.95
pushStackMethod · 0.80
pushScopeMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestStack_PeekFunction · 0.76
TestStack_GetFunction · 0.76