mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 02:16:48 +08:00
update book code
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var i1 int
|
||||
var f1 float32
|
||||
i1, _, f1 = ThreeValues()
|
||||
fmt.Printf("The int: %d, the float: %f \n", i1, f1)
|
||||
}
|
||||
|
||||
func ThreeValues() (int, int, float32) {
|
||||
return 5, 6, 7.5
|
||||
}
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var i1 int
|
||||
var f1 float32
|
||||
i1, _, f1 = ThreeValues()
|
||||
fmt.Printf("The int: %d, the float; %f\n", i1, f1)
|
||||
}
|
||||
|
||||
func ThreeValues() (int, int, float32) {
|
||||
return 5, 6, 7.5
|
||||
}
|
||||
|
Reference in New Issue
Block a user