package simple
import (
"fmt"
"strings"
)
type Animal struct {
Name string
Age int
}
func (a *Animal) Speak() string {
return fmt.Sprintf("%s speaks", a.Name)
}
type internal struct {
count int
}
type Speaker interface {
Speak() string
}
func ProcessItems(items []string) int {
count := 0
for _, item := range items {
if strings.HasPrefix(item, "a") {
count++
}
}
return count
}
func privateHelper() string {
return "helper"
}
func NewAnimal(name string, age int) *Animal {
return &Animal{Name: name, Age: age}
}