go-by-test/counter/counter.go
2024-09-21 17:51:58 +02:00

14 lines
143 B
Go

package counter
type Counter struct {
count int
}
func (c *Counter) Inc() {
c.count++
}
func (c *Counter) Value() int {
return c.count
}