Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.34 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5.     "humanexample/human"
  6. )
  7.  
  8. func main() {
  9.     sully := human.Human{}
  10.     john := human.Human{}
  11.     sully.SetName("Sully")
  12.     john.SetName("John")
  13.  
  14.     fmt.Println(john.Touch(sully))
  15.  
  16.     fmt.Println(sully.GetName())
  17.     fmt.Println(sully.name) // не скомпилируется из-за вот этой строки
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement