First step to get our Noid minter in Go: a counter struct
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
package noid
|
||||||
|
|
||||||
|
type Counter struct {
|
||||||
|
top int
|
||||||
|
value int
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewCounter(top, value int) *Counter {
|
||||||
|
c := Counter{top: top, value: value}
|
||||||
|
return &c
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user