Install Go for MacOS


===========install go==================

 https://golang.org/doc/install


Có 2 biến GOPATH và GOROOT cần lưu ý


GOPATH là nơi dùng để lưu lại package hoặc file bin khi install một package nào đó, hoặc lưu trữ package download về từ git 


GOROOT là nơi chứa thư viện mặc định của go khi cài đặt


=============install visual code============

install plugin for golang


install code in cmd

https://code.visualstudio.com/docs/setup/mac


=================go command===============

Usage:

go <command> [arguments]

The commands are:

bug         start a bug report
build       compile packages and dependencies
clean       remove object files and cached files
doc         show documentation for package or symbol
env         print Go environment information
fix         update packages to use new APIs
fmt         gofmt (reformat) package sources
generate    generate Go files by processing source
get         add dependencies to current module and install them
install     compile and install packages and dependencies
list        list packages or modules
mod         module maintenance
run         compile and run Go program
test        test packages
tool        run specified go tool
version     print Go version
vet         report likely mistakes in packages


===================Go wire===============
















Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch