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

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

GO fundamentals of programming 01

2021年10月17日 705点热度

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安装
Arduino+mqtt 实现本地led显示和远程控制继电器 读《光阴七十载:沃兹尼亚克与他的写意人生播报》文章 inline-block对齐,同级inline-block元素内容不同位置相互影响 读武汉大学教授的演讲《我上研究生时,卸载了所有游戏》 某工会运动会专题 《垃圾分类》微信小程序

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

Theme Kratos Made By Seaton Jiang

黑ICP备19002110号-1

黑公网安备 23060202000432号