mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 06:19:44 +08:00
fix: coding style and file format for chapter 6.
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
// lambda_value.go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fv := func() {
|
||||
fmt.Println("Hello World!")
|
||||
}
|
||||
fv()
|
||||
fmt.Printf("The type of fv is %T", fv)
|
||||
}
|
||||
/* Output:
|
||||
Hello World!
|
||||
The type of fv is func()
|
||||
*/
|
||||
// lambda_value.go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fv := func() {
|
||||
fmt.Println("Hello World!")
|
||||
}
|
||||
fv()
|
||||
fmt.Printf("The type of fv is %T", fv)
|
||||
}
|
||||
|
||||
/* Output:
|
||||
Hello World!
|
||||
The type of fv is func()
|
||||
*/
|
||||
|
Reference in New Issue
Block a user