github.com/keysonZZZ/kmg@v0.0.0-20151121023212-05317bfd7d39/kmgDebug/IncreaseId.go (about)

     1  package kmgDebug
     2  
     3  import (
     4  	"strconv"
     5  	"sync/atomic"
     6  )
     7  
     8  var intId uint64
     9  
    10  func NextIntIdString() string {
    11  	var idInt = atomic.AddUint64(&intId, 1)
    12  	return strconv.FormatUint(idInt, 10)
    13  }