go-by-test/counter/counter.go

14 lines
143 B
Go
Raw Normal View History

2024-09-21 15:51:58 +00:00
package counter
type Counter struct {
count int
}
func (c *Counter) Inc() {
c.count++
}
func (c *Counter) Value() int {
return c.count
}