mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-11 22:53:43 +08:00
16 lines
275 B
Go
16 lines
275 B
Go
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 |