Skip to content

Commit e6b80c4

Browse files
committed
Go test with data
1 parent 2a2b3aa commit e6b80c4

File tree

5 files changed

+55
-19
lines changed

5 files changed

+55
-19
lines changed
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
11
package main
22
import "fmt"
3-
4-
type Toaster struct {
5-
Power int
6-
Colour string
7-
}
8-
9-
type Test struct {
10-
Test string
11-
Toast Toaster
12-
}
13-
143
func main() {
154
var v = "test"
16-
test := Test{
17-
Test: "This is\na\ntest",
18-
Toast: Toaster{
19-
Power: 10,
20-
Colour: "green",
21-
},
22-
}
235
fmt.Println("hello world: " + v)
24-
fmt.Println("Hi " + test.Test)
256
}

support/test/go/structs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hello_world
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"configurations": {
3+
"run-legacy": {
4+
"adapter": "vscode-go",
5+
"configuration": {
6+
"request": "launch",
7+
"program": "${workspaceRoot}/hello-world.go",
8+
"mode": "debug",
9+
"trace": true,
10+
"env": { "GO111MODULE": "off" }
11+
}
12+
},
13+
"run-delve": {
14+
"adapter": "delve",
15+
"configuration": {
16+
"request": "launch",
17+
"env": { "GO111MODULE": "off" },
18+
19+
"mode": "debug", // debug|test
20+
"program": "${workspaceRoot}/hello-world.go"
21+
22+
// "args": [],
23+
// "buildFlags": ...
24+
// "stackTraceDepth": ...,
25+
// "showGlobalVariables": true,
26+
}
27+
}
28+
}
29+
}
1.83 MB
Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package main
2+
import "fmt"
3+
4+
type Toaster struct {
5+
Power int
6+
Colour string
7+
}
8+
9+
type Test struct {
10+
Test string
11+
Toast Toaster
12+
}
13+
14+
func main() {
15+
var v = "test"
16+
test := Test{
17+
Test: "This is\na\ntest",
18+
Toast: Toaster{
19+
Power: 10,
20+
Colour: "green",
21+
},
22+
}
23+
fmt.Println("hello world: " + v)
24+
fmt.Println("Hi " + test.Test)
25+
}

0 commit comments

Comments
 (0)