Skip to content

Instantly share code, notes, and snippets.

@ckeyer
Last active November 13, 2019 05:55
Show Gist options
  • Save ckeyer/5c5de5581827eb7dd244e70bd6463773 to your computer and use it in GitHub Desktop.
Save ckeyer/5c5de5581827eb7dd244e70bd6463773 to your computer and use it in GitHub Desktop.
golang 学习大纲

Golang

环境配置

安装与配置

  • 普通安装
  • 自举安装

命令行工具介绍

环境变量介绍

入门

单文件 Hello World

  • 文件结构
  • 常用包 fmt,os
  • 基本类型
    • 。。。
    • 切片  * interface{}
  • 基本循环、判断语法,与C比较  * if  * for  * switch
  • 返回值,多返回值

多文件的 hello world

与众不同

  • iota
  • defer
  • panic, recover
  • go
  • chan
  • select
break     default     func     interface    select
case      defer       go       map          struct
chan      else        goto     package      switch
const     fallthrough if       range        type
continue  for         import   return       var
func append(slice []Type, elems ...Type) []Type
func cap(v Type) int
func close(c chan<- Type)
func complex(r, i FloatType) ComplexType
func copy(dst, src []Type) int
func delete(m map[Type]Type1, key Type)
func imag(c ComplexType) FloatType
func len(v Type) int
func make(Type, size IntegerType) Type
func new(Type) *Type
func panic(v interface{})
func real(c ComplexType) FloatType
func recover() interface{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment