You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
214 B
21 lines
214 B
3 years ago
|
package main
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
/*
|
||
|
struct是值类型
|
||
|
*/
|
||
|
|
||
|
// NewInt 类型定义
|
||
|
type NewInt int
|
||
|
|
||
|
// MyInt 类型别名
|
||
|
type MyInt = int
|
||
|
|
||
|
func main() {
|
||
|
var a NewInt
|
||
|
var b MyInt
|
||
|
|
||
|
fmt.Printf("a: %T, b: %T\n", a, b)
|
||
|
}
|