Skip to content

Instantly share code, notes, and snippets.

@jiripospisil
Created March 17, 2013 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jiripospisil/5183306 to your computer and use it in GitHub Desktop.
Save jiripospisil/5183306 to your computer and use it in GitHub Desktop.
package main
import "fmt"
type Opicak struct {
Name string
Age int
}
func (b Opicak) PrettyName() string {
return fmt.Sprintf("Von je to %s a je mu %d let", b.Name, b.Age)
}
func main() {
bobo := Opicak{"Bobo", 350}
fmt.Println(bobo.Name)
fmt.Println(bobo.PrettyName())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment