맥에서 Go 설치하기
1. 다운로드
아래 2개를 먼저 다운해야함
Downloads - The Go Programming Language
Downloads After downloading a binary release suitable for your system, please follow the installation instructions. If you are building from source, follow the source installation instructions. See the release history for more information about Go releases
golang.org
Download Visual Studio Code - Mac, Linux, Windows
Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications.
code.visualstudio.com
2. vscode 환경 변수 설정
3. Go 프로젝트 생성 및 vsCode 실행
3-1. 터미널에 go env를 치면 GOPAT가 나온다. 이대로 폴더를 생성하고 그 하위에 아래처럼 서브 디렉터리들을 생성해준다.
3-2. 다 생성했으면 main.go를 생성하고 code .를 입력해주면 vscode가 자동으로 실행된다.
3-3. 그럼 뭐 블라블라 여러가지가 나온다 설치해주면 된다. 9 가장 아래에
3-4. 간단한 코드를 작성하고 터미널에서 go run main.go를 입력하고 Enter, 에러가 발생한다. 코드를 저장하고 다시 해주면 정상 작동한다. 번거롭다 참