package icoder-new
import "fmt"
type Programmer interface {
Eat()
Code()
Sleep()
}
type Gopher struct {
name string
}
func NewGopher(name string) *Gopher {
return &Gopher{name: name}
}
func (g *Gopher) Eat() {
fmt.Printf("%s is eating...\n", g.name)
}
func (g *Gopher) Code() {
fmt.Printf("%s is coding...\n", g.name)
}
func (g *Gopher) Sleep() {
fmt.Printf("%s is sleeping...\n", g.name)
}
func Run() {
gopher := NewGopher("Ehson")
var programmer Programmer = gopher
programmer.Eat()
programmer.Code()
programmer.Sleep()
}
Mr Gopher
Young gopher from Dushanbe. "In search of incredible ๐"
- Tajikistan, Dushanbe
- https://ko-fi.com/fr33d0mz
- https://fr33d0mz.t.me
- in/fr33d0mz
Highlights
Block or Report
Block or report icoder-new
Report abuse
Contact GitHub support about this userโs behavior. Learn more about reporting abuse.
Report abusePinned
-
Rita
Rita PublicForked from ilyas-kalandar/Rita
Just programming language, created fully from scratch for learning compilers.
C++ 1
-
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.