- To check the version of Go installed on your system, run
go version
in your terminal/shell/command line. - To find out what version of Go a binary was built with, use
go version "app-name"
where"app-name"
is the name of your built application. - To figure out at runtime what version of Go an app was built with, use the
runtime.Version()
function.
Check the Go version installed on your system
To find out what version of Go is installed on your system, open your terminal/command line/shell, and run the command:
go version
The version
is a command of the go
tool which prints out version information for Go executables. If no additional arguments are given, it prints out the Go version installed on your computer.
Example of the go version
output:
go version go1.18.4 darwin/amd64
If you want to learn more about the go version
, check the documentation using the command:
go help version
Check what version of Go a binary was built with
To find out what version of Go a given application was built with, just use the go version
command, passing the path to the binary as an argument:
go version <path/to/the/binary>
Example
Create a simple app, for example the “Hello World” application, and save it as a main.go
file:
package main
import "fmt"
func main() {
fmt.Println("Hello World!")
}
Then build the application using the command:
go build -o hello-world
Now you can check what version of Go the hello-world
app was built with:
go version hello-world
In the output, you should see the application name and version:
hello-world: go1.18.4
Check at runtime what version of Go the app was built with
If you want to check directly in the application what version of Go it was built with, you can use the runtime.Version()
function. It returns the Go version information, the same as when using the go version <path/to/the/binary>
command.
Example
Create a new app that prints Go version information and save it as a main.go
file:
package main
import (
"fmt"
"runtime"
)
func main() {
fmt.Println("Hello World!")
fmt.Printf("The application was built with the Go version: %s\n", runtime.Version())
}
Build the application using the command:
go build -o hello-world-with-version
Run the application:
./hello-world-with-version
In the output, you should see the Go version string:
Hello World!
The application was built with the Go version: go1.18.4
Current Go (Golang) version
- The current major Go version is go1.20 (released on February 1, 2023). Read the Go 1.20 Release Notes for more information.
- The latest minor Go version is go1.20.6 (released on July 11, 2023). Read the Release History for more information about Go 1.20.6.
How to upgrade to a newer version of Go?
To update your Go version, go to the official Download and install website. There you will find up-to-date information on how to update an existing version of Go on Linux, macOS, and Windows.
Go (Golang) version history
Major Go releases are labeled as, for example, 1.16
, 1.17
, 1.18
(in the list below, they are written in a larger font). In addition, there are support releases introducing minor fixes labeled as, for example, 1.17.1
, 1.17.2
, and so on. If you want to learn more about the release policy of Go, read the official documentation.
Go was first publicly announced on November 10, 2009.
The first major version of Go - go1
was released on March 28, 2012.
- go1.20.6 - released on July 11, 2023
- go1.20.5 - released on June 6, 2023
- go1.20.4 - released on May 2, 2023
- go1.20.3 - released on April 4, 2023
- go1.20.2 - released on March 7, 2023
- go1.20.1 - released on February 14, 2023
- go1.20 - released on February 1, 2023
- go1.19.11 - released on July 11, 2023
- go1.19.10 - released on June 6, 2023
- go1.19.9 - released on May 2, 2023
- go1.19.8 - released on April 4, 2023
- go1.19.7 - released on March 7, 2023
- go1.19.6 - released on February 14, 2023
- go1.19.5 - released on January 10, 2023
- go1.19.4 - released on December 6, 2022
- go1.19.3 - released on November 1, 2022
- go1.19.2 - released on October 4, 2022
- go1.19.1 - released on September 6, 2022
- go1.19 - released on August 2, 2022
- go1.18.10 - released on January 10, 2023
- go1.18.9 - released on December 6, 2022
- go1.18.8 - released on November 1, 2022
- go1.18.7 - released on October 4, 2022
- go1.18.6 - released on September 6, 2022
- go1.18.5 - released on August 1, 2022
- go1.18.4 - released on July 12, 2022
- go1.18.3 - released on June 1, 2022
- go1.18.2 - released on May 10, 2022
- go1.18.1 - released on April 12, 2022
- go1.18 - released on March 15, 2022
- go1.17.13 - released on August 1, 2022
- go1.17.12 - released on July 12, 2022
- go1.17.11 - released on June 1, 2022
- go1.17.10 - released on May 10, 2022
- go1.17.9 - released on April 12, 2022
- go1.17.8 - released on March 3, 2022
- go1.17.7 - released on February 10, 2022
- go1.17.6 - released on January 6, 2022
- go1.17.5 - released on December 9, 2021
- go1.17.4 - released on December 2, 2021
- go1.17.3 - released on November 4, 2021
- go1.17.2 - released on October 7, 2021
- go1.17.1 - released on September 9, 2021
- go1.17 - released on August 16, 2021
- go1.16.15 - released on March 3, 2022
- go1.16.14 - released on February 10, 2022
- go1.16.13 - released on January 6, 2022
- go1.16.12 - released on December 9, 2021
- go1.16.11 - released on December 2, 2021
- go1.16.10 - released on November 4, 2021
- go1.16.9 - released on October 7, 2021
- go1.16.8 - released on September 9, 2021
- go1.16.7 - released on August 5, 2021
- go1.16.6 - released on July 12, 2021
- go1.16.5 - released on June 3, 2021
- go1.16.4 - released on May 6, 2021
- go1.16.3 - released on April 1, 2021
- go1.16.2 - released on March 11, 2021
- go1.16.1 - released on March 10, 2021
- go1.16 - released on February 16, 2021
- go1.15.15 - released on August 5, 2021
- go1.15.14 - released on July 12, 2021
- go1.15.13 - released on June 3, 2021
- go1.15.12 - released on May 6, 2021
- go1.15.11 - released on April 1, 2021
- go1.15.10 - released on March 11, 2021
- go1.15.9 - released on March 10, 2021
- go1.15.8 - released on February 4, 2021
- go1.15.7 - released on January 19, 2021
- go1.15.6 - released on December 3, 2020
- go1.15.5 - released on November 12, 2020
- go1.15.4 - released on November 5, 2020
- go1.15.3 - released on October 14, 2020
- go1.15.2 - released on September 9, 2020
- go1.15.1 - released on September 1, 2020
- go1.15 - released on August 11, 2020
- go1.14.15 - released on February 4, 2021
- go1.14.14 - released on January 19, 2021
- go1.14.13 - released on December 3, 2020
- go1.14.12 - released on November 12, 2020
- go1.14.11 - released on November 5, 2020
- go1.14.10 - released on October 14, 2020
- go1.14.9 - released on September 9, 2020
- go1.14.8 - released on September 1, 2020
- go1.14.7 - released on August 6, 2020
- go1.14.6 - released on July 16, 2020
- go1.14.5 - released on July 14, 2020
- go1.14.4 - released on June 1, 2020
- go1.14.3 - released on May 14, 2020
- go1.14.2 - released on April 8, 2020
- go1.14.1 - released on March 19, 2020
- go1.14 - released on February 25, 2020
- go1.13.15 - released on August 6, 2020
- go1.13.14 - released on July 16, 2020
- go1.13.13 - released on July 14, 2020
- go1.13.12 - released on June 1, 2020
- go1.13.11 - released on May 14, 2020
- go1.13.10 - released on April 8, 2020
- go1.13.9 - released on March 19, 2020
- go1.13.8 - released on February 12, 2020
- go1.13.7 - released on January 28, 2020
- go1.13.6 - released on January 9, 2020
- go1.13.5 - released on December 4, 2019
- go1.13.4 - released on October 31, 2019
- go1.13.3 - released on October 17, 2019
- go1.13.2 - released on October 17, 2019
- go1.13.1 - released on September 25, 2019
- go1.13 - released on September 3, 2019
- go1.12.17 - released on February 12, 2020
- go1.12.16 - released on January 28, 2020
- go1.12.15 - released on January 9, 2020
- go1.12.14 - released on December 4, 2019
- go1.12.13 - released on October 31, 2019
- go1.12.12 - released on October 17, 2019
- go1.12.11 - released on October 17, 2019
- go1.12.10 - released on September 25, 2019
- go1.12.9 - released on August 15, 2019
- go1.12.8 - released on August 13, 2019
- go1.12.7 - released on July 8, 2019
- go1.12.6 - released on June 11, 2019
- go1.12.5 - released on May 6, 2019
- go1.12.4 - released on April 11, 2019
- go1.12.3 - released on April 8, 2019
- go1.12.2 - released on April 5, 2019
- go1.12.1 - released on March 14, 2019
- go1.12 - released on February 25, 2019
- go1.11.13 - released on August 13, 2019
- go1.11.12 - released on July 8, 2019
- go1.11.11 - released on June 11, 2019
- go1.11.10 - released on May 6, 2019
- go1.11.9 - released on April 11, 2019
- go1.11.8 - released on April 8, 2019
- go1.11.7 - released on April 5, 2019
- go1.11.6 - released on March 14, 2019
- go1.11.5 - released on January 23, 2019
- go1.11.4 - released on December 14, 2018
- go1.11.3 - released on December 12, 2018
- go1.11.2 - released on November 2, 2018
- go1.11.1 - released on October 1, 2018
- go1.11 - released on August 24, 2018
- go1.10.8 - released on January 23, 2019
- go1.10.7 - released on December 14, 2018
- go1.10.6 - released on December 12, 2018
- go1.10.5 - released on November 2, 2018
- go1.10.4 - released on August 24, 2018
- go1.10.3 - released on June 5, 2018
- go1.10.2 - released on May 1, 2018
- go1.10.1 - released on March 28, 2018
- go1.10 - released on February 16, 2018
- go1.9.7 - released on June 5, 2018
- go1.9.6 - released on May 1, 2018
- go1.9.5 - released on March 28, 2018
- go1.9.4 - released on February 7, 2018
- go1.9.3 - released on January 22, 2018
- go1.9.2 - released on October 25, 2017
- go1.9.1 - released on October 4, 2017
- go1.9 - released on August 24, 2017
- go1.8.7 - released on February 7, 2018
- go1.8.6 - released on January 22, 2018
- go1.8.5 - released on October 25, 2017
- go1.8.4 - released on October 4, 2017
- go1.8.3 - released on May 24, 2017
- go1.8.2 - released on May 23, 2017
- go1.8.1 - released on April 7, 2017
- go1.8 - released on February 16, 2017
- go1.7.6 - released on May 23, 2017
- go1.7.5 - released on January 26, 2017
- go1.7.4 - released on December 1, 2016
- go1.7.3 - released on October 19, 2016
- go1.7.2 - not fully released
- go1.7.1 - released on September 7, 2016
- go1.7 - released on August 15, 2016
- go1.6.4 - released on December 1, 2016
- go1.6.3 - released on July 17, 2016
- go1.6.2 - released on April 20, 2016
- go1.6.1 - released on April 12, 2016
- go1.6 - released on February 17, 2016
- go1.5.4 - released on April 12, 2016
- go1.5.3 - released on January 13, 2016
- go1.5.2 - released on December 2, 2015
- go1.5.1 - released on September 8, 2015
- go1.5 - released on August 19, 2015
- go1.4.3 - released on September 22, 2015
- go1.4.2 - released on February 17, 2015
- go1.4.1 - released on January 15, 2015
- go1.4 - released on December 10, 2014
- go1.3.3 - released on September 30, 2014
- go1.3.2 - released on September 25, 2014
- go1.3.1 - released on August 13, 2014
- go1.3 - released on June 18, 2014
- go1.2.2 - released on May 5, 2014
- go1.2.1 - released on March 2, 2014
- go1.2 - released on December 1, 2013
- go1.1.2 - released on August 13, 2013
- go1.1.1 - released on June 13, 2013
- go1.1 - released on May 13, 2013
- go1.0.3 - released on September 21, 2012
- go1.0.2 - released on June 13, 2012
- go1.0.1 - released on April 25, 2012
- go1 - released on March 28, 2012
- Pre-Go 1 Releases
- Go was publicly announed on November 10, 2009