14 lines
143 B
Go
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
|
|
}
|