MCPcopy Create free account
hub / github.com/armstrongli/learn.go / Stack

Struct Stack

chapter07/02.stack/main.go:7–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5)
6
7type Stack struct {
8 data []interface{}
9}
10
11func (s *Stack) Push(data interface{}) {
12 s.data = append([]interface{}{data}, s.data...)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected