随笔分类 -  GoByExample

官方地址:https://gobyexample.com/
摘要:基本变量类型 介绍几种基本的变量类型:字符串、int、float、bool package main import ( "fmt" ) // 列举几种非常基本的数据类型 func main() { fmt.Println("go" + "lang") // 允许使用“+”来连接字符串 fmt.Pri 阅读全文
posted @ 2021-02-23 13:40 只盼一人共白首 阅读(178) 评论(0) 推荐(1)
摘要:HelloWorld与包引用 学习一门语言的惯例都是从helloworld开始,go语言也不例外 在gopath下的src中创建一个helloworld目录,创建main.go文件 package main //包声明 import ( // 引用包 "fmt" ) func main() { // 阅读全文
posted @ 2021-02-18 15:56 只盼一人共白首 阅读(28) 评论(0) 推荐(0)