package main
import (
"fmt"
)
//复杂
func tet(func1 func(int,int) int, num1 int, num2 int) int{
return func1(num1,num2)
}
//函数别名 funcTestType
type funcTestType func(int,int) int
//简单方法
func tet2(func1 funcTestType, num1 int, num2 int) int{
return func1(num1,num2)
}
//获取和的方法
func getSum(a int,b int) int{
c := a + b
return c
}
func main(){
a := tet(getSum,1,2)
fmt.Println(a)
b := tet2(getSum,1,3)
fmt.Println(b)
type myTt int
var age1 myTt = 15
var age int = 10
age = int(age1)
fmt.Printf("类型:%T 值:%d \n",age,age)
fmt.Printf("类型:%T 值:%d",age1,age1)
}