12 lines
155 B
Go
12 lines
155 B
Go
package noid
|
|
|
|
type Counter struct {
|
|
top int
|
|
value int
|
|
}
|
|
|
|
func NewCounter(top, value int) *Counter {
|
|
c := Counter{top: top, value: value}
|
|
return &c
|
|
}
|