mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 07:23:28 +08:00
fix: coding style and file format for chapter 11, 12, 13, 14 and 15.
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
// 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()
|
||||
}
|
||||
// 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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user