☰
Debian Codegraph
@
0.16.1+git20260209.fcb76d1-2
0.16.1+git20260209.fcb76d1-1
/
/
_test
/
variadic3.go
☽
☼
_test/variadic3.go
code
plain
raw
symbols
SCIP
Apache-2.0
2019 Containous SAS; 2020 Traefik Labs SAS
debian/copyright
1
package
main
2
3
import
"fmt"
4
5
func
f(a ...
int
)
int
{
6
fmt.
Println
(a)
7
res :=
0
8
for
_, v :=
range
a {
9
res += v
10
}
11
return
res
12
}
13
14
func
main() {
15
fmt.
Println
(f(
1
,
2
,
3
,
4
))
16
}
17
18
// Output:
19
// [1 2 3 4]
20
// 10