Question: I have 1.7 version of golang and I want to update golang to 1.8 from command prompt. Uninstalling and Installing it again is always an option, but can I update it using commands on Windows 8.1?

Answer: 
Go can also be updated using the [Chocolatey](https://chocolatey.org/packages/golang) package manager. Run from an elevated shell to minimize the risk of installation issues.

Install using:

```
choco install golang -y

```

Update using:

```
choco upgrade golang -y

```
The "normal" way for Windows is to use the MSI package that can be found here : <https://golang.org/dl/>.

Now if you *really* want to do it from the command line, you **will nee**d to know the version (current is 1.13.4). There are several ways I can think of, including scraping the golang website or leveraging the Docker tags matching image with *latest*.  

If you're doing this for administrative reasons, the version can also easily just be an input variable in your system.

Once you know the version you need to download the file at `https://dl.google.com/go/go<version>.windows-amd64.msi`.  

You can use something like wget for Windows or just Powershell capabilities :  

`Invoke-WebRequest -OutFile go1.13.4.windows-amd64.msi https://dl.google.com/go/go1.13.4.windows-amd64.msi`

Then you can just use the MSI in quiet mode :  

`msiexec.exe /package go1.13.4.windows-amd64.msi /quiet`