"Go version"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 2개는 보이지 않습니다)
5번째 줄: 5번째 줄:
* Go 버전을 출력하는 go 명령어
* Go 버전을 출력하는 go 명령어


==개발환경 Go 버전==
==현재 환경의 Go 버전 (기본)==
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
root@wsl:~# go version
root@wsl:~# go version
11번째 줄: 11번째 줄:
</syntaxhighlight>
</syntaxhighlight>


==바이너리 Go 버전==
==바이너리의 Go 버전==
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
root@wsl:~# go version /usr/local/bin/helm
root@wsl:~# go version /usr/local/bin/helm

2025년 8월 13일 (수) 10:45 기준 최신판

1 개요[ | ]

Go 버전 확인
go version
  • Go 버전을 출력하는 go 명령어

2 현재 환경의 Go 버전 (기본)[ | ]

root@wsl:~# go version
go version go1.24.5 linux/amd64

3 바이너리의 Go 버전[ | ]

root@wsl:~# go version /usr/local/bin/helm
/usr/local/bin/helm: go1.24.4
root@wsl:~# go version /usr/local/bin/kubectl
/usr/local/bin/kubectl: go1.24.4

4 버전 표시 Go 코드[ | ]

package main

import (
	"fmt"
	"runtime"
)

func main() {
	fmt.Println(runtime.Version())
	fmt.Println(runtime.GOOS)
	fmt.Println(runtime.GOARCH)
}

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}