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

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

GO fundamentals of programming 01

2021年10月17日 898点热度

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
  • 学习计划
  • 摘抄
  • 随想

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

Theme Kratos Made By Seaton Jiang

蜀ICP备2026065271号-1

蜀公网安备XXXXX号