本文主要介绍数字的指针

/ 数字的指针
package main

import "fmt"

func doubleNumber(number *int) {
	*number *= 2
}

func main() {
	var myInt int
	var myIntPointer *int

	myInt = 6
	myIntPointer = &myInt

	fmt.Println(myIntPointer, *myIntPointer)

	// 数字加倍指针版本
	fmt.Println(myInt)
	doubleNumber(&myInt)
	fmt.Println(myInt)
}