Skip to content

Commit 54c028e

Browse files
authored
Initialize go project
1 parent 463c9a5 commit 54c028e

File tree

6 files changed

+28
-1
lines changed

6 files changed

+28
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"image": "mcr.microsoft.com/devcontainers/go:1.20-bullseye",
44
"customizations": {
55
"vscode": {
6-
"extensions": ["EditorConfig.EditorConfig", "golang.go"]
6+
"extensions": ["EditorConfig.EditorConfig", "golang.go"],
7+
"settings": {
8+
"go.gopath": "/go"
9+
}
710
}
811
},
912
"remoteUser": "vscode"

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ indent_size = 4
1313
[devcontainer.json]
1414
indent_style = space
1515
indent_size = 4
16+
17+
[.vscode/*.json]
18+
indent_style = space
19+
indent_size = 4

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"go.useLanguageServer": true
3+
}

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/spenserblack/git-lazy-commit
2+
3+
go 1.20

lazycommit.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package lazycommit
2+
3+
func Add2(n int) int {
4+
return n + 2
5+
}

lazycommit_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package lazycommit
2+
3+
import "testing"
4+
5+
func TestAdd2(t *testing.T) {
6+
if a := Add2(1); a != 3 {
7+
t.Fatalf("Add2(1) = %d; want 3", a)
8+
}
9+
}

0 commit comments

Comments
 (0)