go 初使用
2016-05-30 20:07
375 查看
hello.go package main import "fmt" func main(){ fmt.Println("hello world")
直接运行shiyanlou:~/ $ go run hello.gohello world
生成二进制文件运行 shiyanlou:~/ $ go build hello.go shiyanlou:~/ $ ./hello.go hello world
// Go 将自动推断已经初始化的变量类型。//初始化用=,类型自动判断为bool 1. var d = true fmt.Println(d) ->true 2. 新变量申明 := e:=false fmt.Println(d) 3. 标准形式 var f string=“this is a test" fmt.Println(f)
相关文章推荐
- 如何让Beamer的logo放在右上角
- Django 进阶(装饰器,Mixin,信号,模式)
- mongo 启动方式
- Django 的文件存储
- 论删除gmscore后可能出现的问题
- GPS坐标互转:WGS-84(GPS)、GCJ-02(Google地图)、BD-09(百度地图)
- go语言版的猜数字游戏
- Django 前后台的数据传递
- Google Guava之--cache
- 【转】google play上传应用
- DrawerLayout+NavigationView打造Google原生Material Design风格侧滑菜单
- Design Patterns Overview
- Savitzky-Golay平滑去噪
- [SimHash] the Hash-based Similarity Detection Algorithm
- golang学习之文件上传
- 基因数据处理41之mango使用失败
- GO语言获取utc时间戳(time_t)
- django-got an unexpected keyword argument ‘maxlength’
- django中cookies和session
- GOLANG IMPORT使用入门