Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/armstrongli/learn.go
/ Push
Method
Push
chapter07/02.stack/main.go:11–13 ·
view source on GitHub ↗
(data interface{})
Source
from the content-addressed store, hash-verified
9
}
10
11
func
(s *Stack) Push(data
interface
{}) {
12
s.data = append([]
interface
{}{data}, s.data...)
13
}
14
15
func
(s *Stack) Pop() (
interface
{}, bool) {
16
if
len(s.data) > 0 {
Callers
1
main
Function · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected