技海泛舟(个人技术研究)

  • 首页
  • 日积月累
  • 学习计划
  • 随想
  • project
  • 关于
技海泛舟
一个技术宅的博客
  1. 首页
  2. 日积月累
  3. go
  4. 正文

GO fundamentals of programming 01

2021年10月17日 652点热度

Frequently used commands

go env
go help
go get
go run 
go build
go fmt
go install
go test  // with '_test.go' at he end of File
go doc

Built in keywords(25,and all lowercase)

break  default func interface select
case defer go map struct chan else
goto package switch const fallthrogh
if range type continue for import return
var

Annotation method

//  Annotation
/* Annotation */

basic_structure.go

// the package name of the current program
package main

// import other packages
import "fmt"

// definition of constants
const PI = 3.14

// declaration and assignment of global variables
var name="goher"

// general type decalration
type newType int

// decalaration of structure
type gopher struct{}

// decalaration of interface
type golang interface{

}

// it is started by the 'main' function as the program entry point
func main() {
Println("hello world! ")
}
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2021年10月17日
< 上一篇
下一篇 >
归档
  • 2024 年 11 月
  • 2024 年 8 月
  • 2024 年 5 月
  • 2024 年 2 月
  • 2023 年 12 月
  • 2023 年 11 月
  • 2023 年 9 月
  • 2023 年 6 月
  • 2022 年 12 月
  • 2022 年 11 月
  • 2022 年 10 月
  • 2022 年 9 月
  • 2022 年 8 月
  • 2022 年 7 月
  • 2022 年 6 月
  • 2022 年 5 月
  • 2022 年 4 月
  • 2022 年 3 月
  • 2022 年 2 月
  • 2022 年 1 月
  • 2021 年 12 月
  • 2021 年 11 月
  • 2021 年 10 月
  • 2021 年 5 月
分类
  • Android
  • Arduino
  • cordova
  • css
  • go
  • html5
  • JavaScript
  • nodejs
  • oracle
  • project
  • system
  • uni-app
  • vscode
  • vue
  • 学习计划
  • 摘抄
  • 随想
最新 热点 随机
最新 热点 随机
windows安装mysql ,VSCODE连接MySQL数据库 创建api的逻辑 观看七战奥运会 德国波尔告别 go utils工具 Go语言中的sort包帮我们实现了对任一类型的数组进行排序。 vue + go安装
位、字节、字的概念和关系 正则表达式 微信小程序答题逻辑 Go语言中的sort包帮我们实现了对任一类型的数组进行排序。 go utils工具 Android存储方式之SQLite

COPYRIGHT © 技海泛舟(个人技术研究). 2021-2023. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

黑ICP备19002110号-1

黑公网安备 23060202000432号