MCPcopy Create free account
hub / github.com/cloudwan/gohan / Add

Method Add

util/util.go:48–50  ·  view source on GitHub ↗

Add add value to the counter

(value int64)

Source from the content-addressed store, hash-verified

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

Callers 1

TestQueueFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestQueueFunction · 0.76