Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type MyType struct {
- Neco int
- Dalsi int
- }
- func (m *MyType) Add() {
- return m.Neco + m.Dalsi
- }
- my := &MyType {
- Neco = 1
- Dalsi = 2
- }
- fmt.Printf("%v+%v = %v", my.Neco, my.Dalso, my.Add())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement