일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- GIT
- docker
- aws사용자모임
- 파이썬
- 함수
- 변수
- dockerfile
- maven
- jenkins
- 애저
- go
- awskrug
- 3티어 아키텍처
- nexus
- 사용자 계정 관리
- 클라우드
- it기사
- AWS
- 표준 라이브러리
- 프로세스 관리
- git hub
- AI
- python
- 리눅스
- terraform
- AI챗봇
- Azure
- OpenAI
- Linux
- open ai
- Today
- Total
We are Architect
GO 설치 및 개발환경 설정 해보기_윈도우(2) 본문
* 해당 카테고리 글은 Tucker님의 go 프로그래밍 언어 강의 를 보면서 쓴 글입니다. 많은 교육자료들이 있으니 참고해보세요!.
https://www.youtube.com/watch?v=KBdz5c-0t1w&list=PLy-g2fnSzUTBHwuXkWQ834QHDZwLx6v6j
* Go 설치하는 법
- Go 설치해보기
- go 사이트로 접속해서 운영체제에 맞게 설치.
- 설치 후 cmd 창에서 go version으로 설치 확인.
The Go Programming Language
DevOps & Site Reliability With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE.
go.dev
- git 설치해보기
Git - Downloads
Downloads macOS Windows Linux/Unix Older releases are available and the Git source repository is on GitHub. Latest source Release 2.47.1 Release Notes (2024-11-25) Download Source Code GUI Clients Git comes with built-in GUI tools (git-gui, gitk), but ther
git-scm.com
- vs code 설치해 보기
Visual Studio Code - Code Editing. Redefined
Visual Studio Code redefines AI-powered coding with GitHub Copilot for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.
code.visualstudio.com
* go 파일로 프로그램 만들어 보기
- go 파일 실행하는 법(문법은 차후에)
- vs code를 실행시키고 확장 모듈을 설치한다.
- 우선 폴더를 만들고 안에 hello.go라는 파일을 만들고 해당 코드를 입력한다.
package main import "fmt" func main() { fmt.Print("Hello world") }
- 터미널 실행
- cmd 창에서 해당 파일이 존재하는 디렉터리로 이동 후 go run hello.go 실행
Hello world의 출력을 볼 수 있다.
- vs code를 실행시키고 확장 모듈을 설치한다.
- 실행 파일로 만들어서 출력하기
- 먼저 module을 만들어주기 > go mod init 폴더 / 파일이 있는 폴더
- build 해주기 > go build hello.go
실행파일을 만들어서 출력
- 먼저 module을 만들어주기 > go mod init 폴더 / 파일이 있는 폴더
이렇게 해서 go를 사용해서 프로그램을 만들어 보았다. 아직은 많이 미숙하나 다루다 보면 괜찮을지도?... 프로그래밍 코드문법이 마치 C언어와 유사하다.(기분 탓인지는 잘 모르겠다.)
'Programing > Go' 카테고리의 다른 글
변수 - 3(6) (0) | 2025.01.05 |
---|---|
변수 - 2(5) (0) | 2025.01.04 |
변수(4) (1) | 2025.01.03 |
Go로 Hello World 출력해보기(3) (1) | 2025.01.02 |
프로그래밍언어 GO 란?(1) (1) | 2024.12.26 |