-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(go): Scope
struct
and interface
type definitions
- Loading branch information
Showing
5 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
tests/langs/snapshots/r#mod__langs__base.go_interface.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
source: tests/langs/mod.rs | ||
expression: inscope_parts | ||
--- | ||
- n: 41 | ||
l: "type Testable interface {\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 42 | ||
l: "\tTest() bool\n" | ||
m: ^^^^^^^^^^^^^^^ | ||
- n: 43 | ||
l: "}\n" | ||
m: "^ " | ||
- n: 313 | ||
l: "type Block interface {\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 314 | ||
l: "\tBlockSize() int\n" | ||
m: ^^^^^^^^^^^^^^^^^^^ | ||
- n: 315 | ||
l: "\tEncrypt(src, dst []byte)\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 316 | ||
l: "\tDecrypt(src, dst []byte)\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 317 | ||
l: "}\n" | ||
m: "^ " |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
source: tests/langs/mod.rs | ||
expression: inscope_parts | ||
--- | ||
- n: 32 | ||
l: "type TestError struct {\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 33 | ||
l: "\tmessage string\n" | ||
m: ^^^^^^^^^^^^^^^^^^ | ||
- n: 34 | ||
l: "}\n" | ||
m: "^ " | ||
- n: 46 | ||
l: "type TestCase struct {\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 47 | ||
l: "\tName string `json:\"name,omitempty\" db:\"name\"`\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 48 | ||
l: "\tInput interface{} `json:\"input\" db:\"input\"`\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 49 | ||
l: "\tExpected interface{} `json:\"expected\" db:\"expected\"`\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 50 | ||
l: "\tunequal bool // Unexported field\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 51 | ||
l: "}\n" | ||
m: "^ " | ||
- n: 54 | ||
l: "type ExtendedTestCase struct {\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 55 | ||
l: "\tTestCase\n" | ||
m: ^^^^^^^^^^^^ | ||
- n: 56 | ||
l: "\ttimeout time.Duration\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 57 | ||
l: "}\n" | ||
m: "^ " | ||
- n: 78 | ||
l: "type GenericPair[T any] struct {\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 79 | ||
l: "\tFirst T\n" | ||
m: ^^^^^^^^^^^^ | ||
- n: 80 | ||
l: "\tSecond T\n" | ||
m: ^^^^^^^^^^^^ | ||
- n: 81 | ||
l: "}\n" | ||
m: "^ " | ||
- n: 303 | ||
l: "type (\n" | ||
m: ^^^^^^^^ | ||
- n: 304 | ||
l: "\tPoint struct{ x, y float64 }\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 305 | ||
l: "\tpolar Point\n" | ||
m: ^^^^^^^^^^^^^^^ | ||
- n: 306 | ||
l: ")\n" | ||
m: "^ " | ||
- n: 308 | ||
l: "type TreeNode struct {\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 309 | ||
l: "\tleft, right *TreeNode\n" | ||
m: ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
- n: 310 | ||
l: "\tvalue any\n" | ||
m: ^^^^^^^^^^^^^^^^^^^ | ||
- n: 311 | ||
l: "}\n" | ||
m: "^ " |