Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit b1ddc8d

Browse files
joshspicerChuxel
andauthored
update golang to in-support versions (1.16 and 1.17) (#1001)
* update golang to in-support versions (1.16 and 1.17) - (#1000) * Update containers/go/definition-manifest.json Co-authored-by: Chuck Lantz <[email protected]> * update go-debian.sh Co-authored-by: Chuck Lantz <[email protected]>
1 parent 7b9e0e1 commit b1ddc8d

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

containers/go/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Choice] Go version: 1, 1.16, 1.15
1+
# [Choice] Go version: 1, 1.16, 1.17
22
ARG VARIANT=1
33
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
44

containers/go/.devcontainer/base.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Choice] Go version: 1, 1.16, 1.15
1+
# [Choice] Go version: 1, 1.16, 1.17
22
ARG VARIANT=1
33
FROM golang:${VARIANT}
44

containers/go/.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"build": {
44
"dockerfile": "Dockerfile",
55
"args": {
6-
// Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.15
6+
// Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17
77
"VARIANT": "1",
88
// Options
99
"NODE_VERSION": "lts/*"

containers/go/.devcontainer/library-scripts/go-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ if [ "${INSTALL_GO_TOOLS}" = "true" ]; then
169169

170170
# Use go get for versions of go under 1.16
171171
go_install_command=install
172-
if [[ "1.16" > "$(go version | grep -oP 'go\K[0-9]+\.[0-9]+\.[0-9]+')" ]]; then
172+
if [[ "1.16" > "$(go version | grep -oP 'go\K[0-9]+\.[0-9]+(\.[0-9]+)?')" ]]; then
173173
export GO111MODULE=on
174174
go_install_command=get
175175
echo "Go version < 1.16, using go get."

containers/go/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
| *Categories* | Core, Languages |
1111
| *Definition type* | Dockerfile |
1212
| *Published images* | mcr.microsoft.com/vscode/devcontainers/go |
13-
| *Available image variants* | 1, 1.15, 1.14 ([full list](https://mcr.microsoft.com/v2/vscode/devcontainers/go/tags/list)) |
13+
| *Available image variants* | 1, 1.16, 1.17 ([full list](https://mcr.microsoft.com/v2/vscode/devcontainers/go/tags/list)) |
1414
| *Published image architecture(s)* | x86-64 |
1515
| *Works in Codespaces* | Yes |
1616
| *Container host OS support* | Linux, macOS, Windows |
@@ -24,21 +24,21 @@ See **[history](history)** for information on the contents of published images.
2424
While the definition itself works unmodified, you can select the version of Go the container uses by updating the `VARIANT` arg in the included `devcontainer.json` (and rebuilding if you've already created the container).
2525

2626
```json
27-
"args": { "VARIANT": "1.14" }
27+
"args": { "VARIANT": "1.17" }
2828
```
2929

3030
You can also directly reference pre-built versions of `.devcontainer/base.Dockerfile` by using the `image` property in `.devcontainer/devcontainer.json` or updating the `FROM` statement in your own `Dockerfile` to one of the following. An example `Dockerfile` is included in this repository.
3131

3232
- `mcr.microsoft.com/vscode/devcontainers/go` (latest)
3333
- `mcr.microsoft.com/vscode/devcontainers/go:1`
34-
- `mcr.microsoft.com/vscode/devcontainers/go:1.15`
35-
- `mcr.microsoft.com/vscode/devcontainers/go:1.14`
34+
- `mcr.microsoft.com/vscode/devcontainers/go:1.16`
35+
- `mcr.microsoft.com/vscode/devcontainers/go:1.17`
3636

3737
You can decide how often you want updates by referencing a [semantic version](https://semver.org/) of each image. For example:
3838

39-
- `mcr.microsoft.com/vscode/devcontainers/go:0-1.15`
40-
- `mcr.microsoft.com/vscode/devcontainers/go:0.202-1.15`
41-
- `mcr.microsoft.com/vscode/devcontainers/go:0.202.5-1.15`
39+
- `mcr.microsoft.com/vscode/devcontainers/go:0-1.16`
40+
- `mcr.microsoft.com/vscode/devcontainers/go:0.204-1.16`
41+
- `mcr.microsoft.com/vscode/devcontainers/go:0.204.5-1.16`
4242

4343
See [history](history) for information on the contents of each version and [here for a complete list of available tags](https://mcr.microsoft.com/v2/vscode/devcontainers/go/tags/list).
4444

containers/go/definition-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"variants": ["1.16", "1.15"],
3-
"definitionVersion": "0.203.0",
2+
"variants": ["1.17", "1.16"],
3+
"definitionVersion": "0.204.0",
44
"build": {
55
"latest": true,
66
"rootDistro": "debian",
77
"tags": [
88
"go:${VERSION}-${VARIANT}"
99
],
1010
"variantTags": {
11-
"1.16": [ "go:${VERSION}-1" ]
11+
"1.17": [ "go:${VERSION}-1" ]
1212
}
1313
},
1414
"dependencies": {

script-library/go-debian.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ if [ "${INSTALL_GO_TOOLS}" = "true" ]; then
169169

170170
# Use go get for versions of go under 1.16
171171
go_install_command=install
172-
if [[ "1.16" > "$(go version | grep -oP 'go\K[0-9]+\.[0-9]+\.[0-9]+')" ]]; then
172+
if [[ "1.16" > "$(go version | grep -oP 'go\K[0-9]+\.[0-9]+(\.[0-9]+)?')" ]]; then
173173
export GO111MODULE=on
174174
go_install_command=get
175175
echo "Go version < 1.16, using go get."

0 commit comments

Comments
 (0)