Initial
This commit is contained in:
33
.devcontainer/Dockerfile
Normal file
33
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
#-----------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
#-----------------------------------------------------------------------------------------
|
||||
|
||||
FROM golang:1
|
||||
|
||||
RUN go get -u -v \
|
||||
github.com/mdempsky/gocode \
|
||||
github.com/uudashr/gopkgs/cmd/gopkgs \
|
||||
github.com/ramya-rao-a/go-outline \
|
||||
github.com/acroca/go-symbols \
|
||||
golang.org/x/tools/cmd/guru \
|
||||
golang.org/x/tools/cmd/gorename \
|
||||
github.com/rogpeppe/godef \
|
||||
github.com/zmb3/gogetdoc \
|
||||
github.com/sqs/goreturns \
|
||||
golang.org/x/tools/cmd/goimports \
|
||||
golang.org/x/lint/golint \
|
||||
github.com/alecthomas/gometalinter \
|
||||
honnef.co/go/tools/... \
|
||||
github.com/golangci/golangci-lint/cmd/golangci-lint \
|
||||
github.com/mgechev/revive \
|
||||
github.com/derekparker/delve/cmd/dlv
|
||||
|
||||
# Install git, process tools
|
||||
RUN apt-get update && apt-get -y install git procps
|
||||
|
||||
# Clean up
|
||||
RUN apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
12
.devcontainer/devcontainer.json
Normal file
12
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Go",
|
||||
"dockerFile": "Dockerfile",
|
||||
"extensions": [
|
||||
"ms-vscode.go"
|
||||
],
|
||||
"runArgs": [
|
||||
"--cap-add=SYS_PTRACE",
|
||||
"--security-opt",
|
||||
"seccomp=unconfined"
|
||||
]
|
||||
}
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -328,3 +328,7 @@ ASALocalRun/
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
*.DS_Store
|
||||
|
||||
out
|
||||
12
.vscode/launch.json
vendored
Normal file
12
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch file",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "debug",
|
||||
"program": "${file}"
|
||||
}
|
||||
]
|
||||
}
|
||||
16
README.md
16
README.md
@@ -1,5 +1,14 @@
|
||||
# Go Sample Project for Visual Studio Remote - Containers
|
||||
|
||||
# Contributing
|
||||
This is a sample project to go along with the "try" quick start for the VS Code Remote - Containers extension.
|
||||
|
||||
Using the sample:
|
||||
|
||||
1. **[Windows]** Disable automatic line ending conversion for Git on the *Windows side* (given Linux and Windows use different line endings). Run: `git config --global core.autocrlf false`
|
||||
2. Follow the steps at [https://aka.ms/vscode-remote/containers/getting-started](https://aka.ms/vscode-remote/containers/getting-started).
|
||||
3. Open `hello.go`, edit, launch the program, and try things out!
|
||||
|
||||
## Contributing
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
@@ -12,3 +21,8 @@ provided by the bot. You will only need to do this once across all repos using o
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
## License
|
||||
|
||||
Copyright © Microsoft Corporation All rights reserved.<br />
|
||||
Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
10
hello.go
Normal file
10
hello.go
Normal file
@@ -0,0 +1,10 @@
|
||||
/*----------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
||||
*---------------------------------------------------------------------------------------*/
|
||||
|
||||
package main
|
||||
import "fmt"
|
||||
func main() {
|
||||
fmt.Println("hello world")
|
||||
}
|
||||
Reference in New Issue
Block a user