Created
October 11, 2019 06:41
-
-
Save rhopp/1513fa375d21dd4f14781cf6d051829f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: 1.0.0 | |
metadata: | |
generateName: golang- | |
projects: | |
- | |
name: example | |
source: | |
type: git | |
location: https://github.com/RedHatOfficial/GoCourse.git | |
clonePath: src/github.com/RedHatOfficial/GoCourse/ | |
components: | |
- | |
type: chePlugin | |
id: ms-vscode/go/latest | |
alias: go-plugin | |
memoryLimit: 512Mi | |
- | |
type: dockerimage | |
# this version is used in the plugin | |
image: quay.io/eclipse/che-golang-1.10:nightly | |
alias: go-cli | |
env: | |
- name: GOPATH | |
# replicate the GOPATH from the plugin | |
value: /go:$(CHE_PROJECTS_ROOT) | |
- name: GOCACHE | |
# replicate the GOCACHE from the plugin, even though the cache is not shared | |
# between the two | |
value: /tmp/.cache | |
endpoints: | |
- name: '8080/tcp' | |
port: 8080 | |
memoryLimit: 512Mi | |
mountSources: true | |
commands: | |
- | |
name: run slides | |
actions: | |
- type: exec | |
component: go-cli | |
command: go run golang.org/x/tools/cmd/present | |
workdir: ${CHE_PROJECTS_ROOT}/src/github.com/RedHatOfficial/GoCourse/ | |
- | |
name: run server.go | |
actions: | |
- type: exec | |
component: go-cli | |
command: go run ${CHE_PROJECTS_ROOT}/src/github.com/RedHatOfficial/GoCourse/src/server | |
- | |
name: run current file | |
actions: | |
- type: exec | |
component: go-cli | |
command: go get -d && go run ${file} | |
workdir: ${fileDirname} | |
- | |
name: Debug current file | |
actions: | |
- type: vscode-launch | |
referenceContent: | | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Debug current file", | |
"type": "go", | |
"request": "launch", | |
"mode": "auto", | |
"program": "${fileDirname}", | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment