Debian Codegraph @

test/b/functions.go

raw symbols SCIP
1 // package b
2 package b
3
4 func func0() {}
5
6 // single comment
7 func Func1() {}
8
9 // multi
10 // line
11 // comment
12 func Func2[T any](arg1 int) (a T, b error) {
13 return
14 }
15
16 // function with multiple generic types
17 func Func3[A string, B, C any](arg1 A, arg2 B, arg3 int) (a A, b C) {
18 return
19 }
20
21 // function that returns a function
22 func Func4(arg1 int) (a func() int) {
23 return a
24 }
25
26 // function with ommited argument types
27 func Func5(arg0 string, arg1, arg2 int) {
28 }
29
30 // function with reserved argument name and variadic type
31 func Func6(catch string, optional ...string) {
32 }
33
34 // function with ommited argument names
35 func Func7(string, int, ...bool) {
36 }
37
38 // function with named return values
39 func Func8() (b int, c string) {
40 return
41 }
42
43 // function with shortened return values
44 func Func9() (b, c string) {
45 return
46 }
47
48 // function with named and shortened return values
49 func Func10() (a int, b, c string) {
50 return
51 }