标签:pac lan str 程序包 接口 全局 port const 全局变量
1.package 程序包 package main
2.import //导入其他程序包
import "fmt"
换成别名 点号 省略调用
import std “fmt” //可以进行别名
3.const 常量的声明
4.var 全局变量的声明
5. type newType int 一般类型的声明
6.type gopher struct{} //结构的声明
7.type golang interface{} //接口的声明
8.func main(){} //函数
标签:pac lan str 程序包 接口 全局 port const 全局变量
原文地址:https://www.cnblogs.com/xiaohaio/p/9083825.html