Tuesday, April 16, 2024
HomeGolangEasy methods to examine your Go (Golang) model

Easy methods to examine your Go (Golang) model



  • To examine the model of Go put in in your system, run go model in your terminal/shell/command line.
  • To seek out out what model of Go a binary was constructed with, use go model "app-name" the place "app-name" is the title of your constructed utility.
  • To determine at runtime what model of Go an app was constructed with, use the runtime.Model() perform.

Verify the Go model put in in your system

To seek out out what model of Go is put in in your system, open your terminal/command line/shell, and run the command:

The model is a command of the go device which prints out model data for Go executables. If no further arguments are given, it prints out the Go model put in in your laptop.

Instance of the go model output:

go model go1.18.4 darwin/amd64

If you wish to study extra in regards to the go model, examine the documentation utilizing the command:

Verify what model of Go a binary was constructed with

To seek out out what model of Go a given utility was constructed with, simply use the go model command, passing the trail to the binary as an argument:

go model <path/to/the/binary>

Instance

Create a easy app, for instance the “Hey World” utility, and reserve it as a predominant.go file:

package deal predominant

import "fmt"

func predominant() {
    fmt.Println("Hey World!")
}

Then construct the applying utilizing the command:

Now you’ll be able to examine what model of Go the hello-world app was constructed with:

Within the output, it is best to see the applying title and model:

Verify at runtime what model of Go the app was constructed with

If you wish to examine instantly within the utility what model of Go it was constructed with, you should utilize the runtime.Model() perform. It returns the Go model data, the identical as when utilizing the go model <path/to/the/binary> command.

Instance

Create a brand new app that prints Go model data and reserve it as a predominant.go file:

package deal predominant

import (
    "fmt"
    "runtime"
)

func predominant() {
    fmt.Println("Hey World!")
    fmt.Printf("The applying was constructed with the Go model: %sn", runtime.Model())
}

Construct the applying utilizing the command:

go construct -o hello-world-with-version

Run the applying:

./hello-world-with-version

Within the output, it is best to see the Go model string:

Hey World!
The applying was constructed with the Go model: go1.18.4

Present Go (Golang) model

  • The present main Go model is go1.19 (launched on August 2, 2022). Learn the Go 1.19 Launch Notes for extra data.
  • The newest minor Go model is go1.19.1 (launched on September 6, 2022). Learn the Launch Historical past for extra details about Go 1.19.1.

Easy methods to improve to a more moderen model of Go?

To replace your Go model, go to the official Obtain and set up web site. There you will see up-to-date data on learn how to replace an present model of Go on Linux, macOS, and Home windows.

Go (Golang) model historical past

Main Go releases are labeled as, for instance, 1.16, 1.17, 1.18 (within the checklist under, they’re written in a bigger font). As well as, there are assist releases introducing minor fixes labeled as, for instance, 1.17.1, 1.17.2, and so forth. If you wish to study extra in regards to the launch coverage of Go, learn the official documentation.

Go was first publicly introduced on November 10, 2009.

The primary main model of Gogo1 was launched on March 28, 2012.

  • go1.19.1 – launched on September 6, 2022
  • go1.19 – launched on August 2, 2022
  • go1.18.6 – launched on September 6, 2022
  • go1.18.5 – launched on August 1, 2022
  • go1.18.4 – launched on July 12, 2022
  • go1.18.3 – launched on June 1, 2022
  • go1.18.2 – launched on Might 10, 2022
  • go1.18.1 – launched on April 12, 2022
  • go1.18 – launched on March 15, 2022
  • go1.17.13 – launched on August 1, 2022
  • go1.17.12 – launched on July 12, 2022
  • go1.17.11 – launched on June 1, 2022
  • go1.17.10 – launched on Might 10, 2022
  • go1.17.9 – launched on April 12, 2022
  • go1.17.8 – launched on March 3, 2022
  • go1.17.7 – launched on February 10, 2022
  • go1.17.6 – launched on January 6, 2022
  • go1.17.5 – launched on December 9, 2021
  • go1.17.4 – launched on December 2, 2021
  • go1.17.3 – launched on November 4, 2021
  • go1.17.2 – launched on October 7, 2021
  • go1.17.1 – launched on September 9, 2021
  • go1.17 – launched on August 16, 2021
  • go1.16.15 – launched on March 3, 2022
  • go1.16.14 – launched on February 10, 2022
  • go1.16.13 – launched on January 6, 2022
  • go1.16.12 – launched on December 9, 2021
  • go1.16.11 – launched on December 2, 2021
  • go1.16.10 – launched on November 4, 2021
  • go1.16.9 – launched on October 7, 2021
  • go1.16.8 – launched on September 9, 2021
  • go1.16.7 – launched on August 5, 2021
  • go1.16.6 – launched on July 12, 2021
  • go1.16.5 – launched on June 3, 2021
  • go1.16.4 – launched on Might 6, 2021
  • go1.16.3 – launched on April 1, 2021
  • go1.16.2 – launched on March 11, 2021
  • go1.16.1 – launched on March 10, 2021
  • go1.16 – launched on February 16, 2021
  • go1.15.15 – launched on August 5, 2021
  • go1.15.14 – launched on July 12, 2021
  • go1.15.13 – launched on June 3, 2021
  • go1.15.12 – launched on Might 6, 2021
  • go1.15.11 – launched on April 1, 2021
  • go1.15.10 – launched on March 11, 2021
  • go1.15.9 – launched on March 10, 2021
  • go1.15.8 – launched on February 4, 2021
  • go1.15.7 – launched on January 19, 2021
  • go1.15.6 – launched on December 3, 2020
  • go1.15.5 – launched on November 12, 2020
  • go1.15.4 – launched on November 5, 2020
  • go1.15.3 – launched on October 14, 2020
  • go1.15.2 – launched on September 9, 2020
  • go1.15.1 – launched on September 1, 2020
  • go1.15 – launched on August 11, 2020
  • go1.14.15 – launched on February 4, 2021
  • go1.14.14 – launched on January 19, 2021
  • go1.14.13 – launched on December 3, 2020
  • go1.14.12 – launched on November 12, 2020
  • go1.14.11 – launched on November 5, 2020
  • go1.14.10 – launched on October 14, 2020
  • go1.14.9 – launched on September 9, 2020
  • go1.14.8 – launched on September 1, 2020
  • go1.14.7 – launched on August 6, 2020
  • go1.14.6 – launched on July 16, 2020
  • go1.14.5 – launched on July 14, 2020
  • go1.14.4 – launched on June 1, 2020
  • go1.14.3 – launched on Might 14, 2020
  • go1.14.2 – launched on April 8, 2020
  • go1.14.1 – launched on March 19, 2020
  • go1.14 – launched on February 25, 2020
  • go1.13.15 – launched on August 6, 2020
  • go1.13.14 – launched on July 16, 2020
  • go1.13.13 – launched on July 14, 2020
  • go1.13.12 – launched on June 1, 2020
  • go1.13.11 – launched on Might 14, 2020
  • go1.13.10 – launched on April 8, 2020
  • go1.13.9 – launched on March 19, 2020
  • go1.13.8 – launched on February 12, 2020
  • go1.13.7 – launched on January 28, 2020
  • go1.13.6 – launched on January 9, 2020
  • go1.13.5 – launched on December 4, 2019
  • go1.13.4 – launched on October 31, 2019
  • go1.13.3 – launched on October 17, 2019
  • go1.13.2 – launched on October 17, 2019
  • go1.13.1 – launched on September 25, 2019
  • go1.13 – launched on September 3, 2019
  • go1.12.17 – launched on February 12, 2020
  • go1.12.16 – launched on January 28, 2020
  • go1.12.15 – launched on January 9, 2020
  • go1.12.14 – launched on December 4, 2019
  • go1.12.13 – launched on October 31, 2019
  • go1.12.12 – launched on October 17, 2019
  • go1.12.11 – launched on October 17, 2019
  • go1.12.10 – launched on September 25, 2019
  • go1.12.9 – launched on August 15, 2019
  • go1.12.8 – launched on August 13, 2019
  • go1.12.7 – launched on July 8, 2019
  • go1.12.6 – launched on June 11, 2019
  • go1.12.5 – launched on Might 6, 2019
  • go1.12.4 – launched on April 11, 2019
  • go1.12.3 – launched on April 8, 2019
  • go1.12.2 – launched on April 5, 2019
  • go1.12.1 – launched on March 14, 2019
  • go1.12 – launched on February 25, 2019
  • go1.11.13 – launched on August 13, 2019
  • go1.11.12 – launched on July 8, 2019
  • go1.11.11 – launched on June 11, 2019
  • go1.11.10 – launched on Might 6, 2019
  • go1.11.9 – launched on April 11, 2019
  • go1.11.8 – launched on April 8, 2019
  • go1.11.7 – launched on April 5, 2019
  • go1.11.6 – launched on March 14, 2019
  • go1.11.5 – launched on January 23, 2019
  • go1.11.4 – launched on December 14, 2018
  • go1.11.3 – launched on December 12, 2018
  • go1.11.2 – launched on November 2, 2018
  • go1.11.1 – launched on October 1, 2018
  • go1.11 – launched on August 24, 2018
  • go1.10.8 – launched on January 23, 2019
  • go1.10.7 – launched on December 14, 2018
  • go1.10.6 – launched on December 12, 2018
  • go1.10.5 – launched on November 2, 2018
  • go1.10.4 – launched on August 24, 2018
  • go1.10.3 – launched on June 5, 2018
  • go1.10.2 – launched on Might 1, 2018
  • go1.10.1 – launched on March 28, 2018
  • go1.10 – launched on February 16, 2018
  • go1.9.7 – launched on June 5, 2018
  • go1.9.6 – launched on Might 1, 2018
  • go1.9.5 – launched on March 28, 2018
  • go1.9.4 – launched on February 7, 2018
  • go1.9.3 – launched on January 22, 2018
  • go1.9.2 – launched on October 25, 2017
  • go1.9.1 – launched on October 4, 2017
  • go1.9 – launched on August 24, 2017
  • go1.8.7 – launched on February 7, 2018
  • go1.8.6 – launched on January 22, 2018
  • go1.8.5 – launched on October 25, 2017
  • go1.8.4 – launched on October 4, 2017
  • go1.8.3 – launched on Might 24, 2017
  • go1.8.2 – launched on Might 23, 2017
  • go1.8.1 – launched on April 7, 2017
  • go1.8 – launched on February 16, 2017
  • go1.7.6 – launched on Might 23, 2017
  • go1.7.5 – launched on January 26, 2017
  • go1.7.4 – launched on December 1, 2016
  • go1.7.3 – launched on October 19, 2016
  • go1.7.2 – not absolutely launched
  • go1.7.1 – launched on September 7, 2016
  • go1.7 – launched on August 15, 2016
  • go1.6.4 – launched on December 1, 2016
  • go1.6.3 – launched on July 17, 2016
  • go1.6.2 – launched on April 20, 2016
  • go1.6.1 – launched on April 12, 2016
  • go1.6 – launched on February 17, 2016
  • go1.5.4 – launched on April 12, 2016
  • go1.5.3 – launched on January 13, 2016
  • go1.5.2 – launched on December 2, 2015
  • go1.5.1 – launched on September 8, 2015
  • go1.5 – launched on August 19, 2015
  • go1.4.3 – launched on September 22, 2015
  • go1.4.2 – launched on February 17, 2015
  • go1.4.1 – launched on January 15, 2015
  • go1.4 – launched on December 10, 2014
  • go1.3.3 – launched on September 30, 2014
  • go1.3.2 – launched on September 25, 2014
  • go1.3.1 – launched on August 13, 2014
  • go1.3 – launched on June 18, 2014
  • go1.2.2 – launched on Might 5, 2014
  • go1.2.1 – launched on March 2, 2014
  • go1.2 – launched on December 1, 2013
  • go1.1.2 – launched on August 13, 2013
  • go1.1.1 – launched on June 13, 2013
  • go1.1 – launched on Might 13, 2013
  • go1.0.3 – launched on September 21, 2012
  • go1.0.2 – launched on June 13, 2012
  • go1.0.1 – launched on April 25, 2012
  • go1 – launched on March 28, 2012
  • Pre-Go 1 Releases
  • Go was publicly announed on November 10, 2009
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments