Skip to content

Latest commit

 

History

History
81 lines (53 loc) · 2.09 KB

golang-tips.md

File metadata and controls

81 lines (53 loc) · 2.09 KB

Golang Learning For Beginner

Overview

  • Strong and statically typed

  • Excellect community

  • Key features

    • Simplicity
    • Fast compile times
    • Garbage collected
    • Built-in concurrency
    • Compile to standalone binaries

书籍推荐

  1. https://github.com/unknwon/the-way-to-go_ZH_CN
  2. https://golang2.eddycjy.com/posts/ch1/01-simple-flag/

How to try it

https://play.golang.org/

How to setup develop env

Install

  1. 下载golang

  2. vscode

Env profile

  • GOROOT is a variable that defines where your Go SDK is located. You do not need to change this variable, unless you plan to use different Go versions.

  • GOPATH is a variable that defines the root of your workspace.

    • src/: location of Go source code (for example, .go, .c, .g, .s).

    • pkg/: location of compiled package code (for example, .a).

    • bin/: location of compiled executable programs built by Go.

Go module

Go Mod 包管理 & 常见问题

vscode plugins

  • Go

  • Bracket Pair Colorizer

  • GitLens - Git supercharged

  • indent-rainbow

First program/module

Project Layout/Advices

  1. project-laybout
  2. golang 代码规范等
  3. Tencent Go安全指南
  4. golang 101

Resources

  1. https://golang.org/doc/
  2. https://github.com/golang/go/wiki/CodeReviewComments