mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:21:38 +08:00
fix: coding style and file format for all example.
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"./struct_pack/structPack"
|
||||
)
|
||||
|
||||
func main() {
|
||||
struct1 := new(structPack.ExpStruct)
|
||||
struct1.Mi1 = 10
|
||||
struct1.Mf1 = 16.
|
||||
fmt.Printf("Mi1 = %d\n", struct1.Mi1)
|
||||
fmt.Printf("Mf1 = %f\n", struct1.Mf1)
|
||||
}
|
||||
// Mi1 = 10
|
||||
// Mf1 = 16.000000
|
||||
package main
|
||||
|
||||
import (
|
||||
"./struct_pack/structPack"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
struct1 := new(structPack.ExpStruct)
|
||||
struct1.Mi1 = 10
|
||||
struct1.Mf1 = 16.
|
||||
fmt.Printf("Mi1 = %d\n", struct1.Mi1)
|
||||
fmt.Printf("Mf1 = %f\n", struct1.Mf1)
|
||||
}
|
||||
|
||||
// Mi1 = 10
|
||||
// Mf1 = 16.000000
|
||||
|
Reference in New Issue
Block a user