diff --git a/practice/main.go b/practice/main.go index b169ae4..5bbf087 100644 --- a/practice/main.go +++ b/practice/main.go @@ -5,32 +5,5 @@ import ( ) func main() { - poodle := Dog{"Poodle", 10, "Woof!"} - fmt.Println(poodle) - fmt.Printf("%+v\n", poodle) - fmt.Printf("Breed: %v\nWeight: %v\n", poodle.Breed, poodle.Weight) - - poodle.Speak() - poodle.Sound = "Arf!" - poodle.Speak() - poodle.SpeakThreeTimes() - poodle.SpeakThreeTimes() -} - -// Dog is a struct -type Dog struct { - Breed string - Weight int - Sound string -} - -// Speak is how the dog speaks -func (d Dog) Speak() { - fmt.Println(d.Sound) -} - -// SpeakThreeTimes is how the dog speaks loudly -func (d Dog) SpeakThreeTimes() { - d.Sound = fmt.Sprintf("%v %v %v", d.Sound, d.Sound, d.Sound) - fmt.Println(d.Sound) + fmt.Println("Files") }