Add add value to the counter
(value int64)
| 46 | |
| 47 | //Add add value to the counter |
| 48 | func (counter *Counter) Add(value int64) { |
| 49 | atomic.AddInt64(&counter.value, int64(value)) |
| 50 | } |
| 51 | |
| 52 | //Value get current value |
| 53 | func (counter *Counter) Value() int64 { |