mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 06:23:59 +08:00
17 lines
255 B
Go
Executable File
17 lines
255 B
Go
Executable File
// main_stack_v2.go
|
|
package main
|
|
|
|
import (
|
|
"./stack/collection"
|
|
"fmt"
|
|
)
|
|
|
|
func main() {
|
|
var s collection.Stack
|
|
s.Push("world")
|
|
s.Push("hello, ")
|
|
for s.Size() > 0 {
|
|
fmt.Print(s.Pop())
|
|
}
|
|
fmt.Println()
|
|
} |