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

CreatePlugin: Add vscode launch.json files for backend debug mode #224

Merged
merged 2 commits into from
Mar 20, 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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ yarn-error.log*
# Generated files
.docusaurus
.cache-loader
docusaurus/docs/signing-your-plugin.md
docusaurus/docs/signing-your-plugin.md

# Allow vscode config inside templates
!packages/create-plugin/templates/*/.vscode
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Standalone debug mode",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/pkg",
"env": {},
"args": [
"-standalone"
]
}
]
}
2 changes: 1 addition & 1 deletion packages/create-plugin/templates/backend-app/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}

go 1.19

require github.com/grafana/grafana-plugin-sdk-go v0.155.0
require github.com/grafana/grafana-plugin-sdk-go v0.156.0

require (
github.com/BurntSushi/toml v1.2.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions packages/create-plugin/templates/backend-app/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grafana/grafana-plugin-sdk-go v0.155.0 h1:i6yQu3RegxxFph2poE2+DOG8EHT1R9LS5WDbTglIhSQ=
github.com/grafana/grafana-plugin-sdk-go v0.155.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grafana/grafana-plugin-sdk-go v0.156.0 h1:LPR5gpROmdwkkvm5oGihl0mSKyWNHWIjAjzzTxk3k7M=
github.com/grafana/grafana-plugin-sdk-go v0.156.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
Expand Down
16 changes: 16 additions & 0 deletions packages/create-plugin/templates/backend/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Standalone debug mode",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/pkg",
"env": {},
"args": [
"-standalone"
]
}
]
}
2 changes: 1 addition & 1 deletion packages/create-plugin/templates/backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/{{ kebabCase orgName }}/{{ kebabCase pluginName }}

go 1.19

require github.com/grafana/grafana-plugin-sdk-go v0.155.0
require github.com/grafana/grafana-plugin-sdk-go v0.156.0

require (
github.com/BurntSushi/toml v1.2.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions packages/create-plugin/templates/backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grafana/grafana-plugin-sdk-go v0.155.0 h1:i6yQu3RegxxFph2poE2+DOG8EHT1R9LS5WDbTglIhSQ=
github.com/grafana/grafana-plugin-sdk-go v0.155.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grafana/grafana-plugin-sdk-go v0.156.0 h1:LPR5gpROmdwkkvm5oGihl0mSKyWNHWIjAjzzTxk3k7M=
github.com/grafana/grafana-plugin-sdk-go v0.156.0/go.mod h1:Wj4WD+sfoUB/q5UG016IvUQBM7HBJaNEAc88b++4szs=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
Expand Down