Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update go tools #559

Merged
merged 5 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/go/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "go",
"version": "1.1.3",
"version": "1.2.0",
"name": "Go",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/go",
"description": "Installs Go and common Go utilities. Auto-detects latest version and installs needed dependencies.",
Expand Down
11 changes: 7 additions & 4 deletions src/go/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,18 @@ else
fi

# Install Go tools that are isImportant && !replacedByGopls based on
# https://github.com/golang/vscode-go/blob/v0.31.1/src/goToolsInformation.ts
# https://github.com/golang/vscode-go/blob/v0.38.0/src/goToolsInformation.ts
samruddhikhandale marked this conversation as resolved.
Show resolved Hide resolved
samruddhikhandale marked this conversation as resolved.
Show resolved Hide resolved
GO_TOOLS="\
golang.org/x/tools/gopls@latest \
honnef.co/go/tools/cmd/staticcheck@latest \
golang.org/x/lint/golint@latest \
github.com/mgechev/revive@latest \
github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
github.com/ramya-rao-a/go-outline@latest \
github.com/go-delve/delve/cmd/dlv@latest"
github.com/go-delve/delve/cmd/dlv@latest \
samruddhikhandale marked this conversation as resolved.
Show resolved Hide resolved
github.com/fatih/gomodifytags@latest \
github.com/haya14busa/goplay/cmd/goplay@latest \
github.com/cweill/gotests/gotests@latest \
github.com/josharian/impl@latest"

if [ "${INSTALL_GO_TOOLS}" = "true" ]; then
echo "Installing common Go tools..."
export PATH=${TARGET_GOROOT}/bin:${PATH}
Expand Down
15 changes: 15 additions & 0 deletions test/go/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,24 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib

# go
check "version" go version

# revive
check "revive version" revive --version
check "revive is installed at correct path" bash -c "which revive | grep /go/bin/revive"

# gomodifytags
check "gomodifytags is installed at correct path" bash -c "which gomodifytags | grep /go/bin/gomodifytags"

# goplay
check "goplay is installed at correct path" bash -c "which goplay | grep /go/bin/goplay"

# gotests
check "gotests is installed at correct path" bash -c "which gotests | grep /go/bin/gotests"

# impl
check "impl is installed at correct path" bash -c "which impl | grep /go/bin/impl"

# Report result
reportResults