☰
Debian Codegraph
@
0.16.1+git20260209.fcb76d1-2
0.16.1+git20260209.fcb76d1-1
/
/
_test
/
method3.go
☽
☼
_test/method3.go
code
plain
raw
symbols
SCIP
Apache-2.0
2019 Containous SAS; 2020 Traefik Labs SAS
debian/copyright
1
package
main
2
3
type
Coord
struct
{
4
x
,
y
int
5
}
6
7
func
(c
Coord
)
dist
()
int
{
return
c.
x
*c.
x
+ c.
y
*c.
y
}
8
9
type
Point
struct
{
10
Coord
11
z
int
12
}
13
14
func
main() {
15
o :=
Point
{
Coord
{
3
,
4
},
5
}
16
println(o.
Coord
.
dist
())
17
}
18
19
// Output:
20
// 25