code: func getAtomicCounter() string {
  	atomic.AddInt32(&counter, 1)
  	if counter > 58*58*58*58-1 {
  		// Reset the counter if we're beyond what we
  		// can represent with 4 base58 characters
  		atomic.StoreInt32(&counter, 0)
  	}
  	counterBytes := base58.EncodeBig(nil, big.NewInt(int64(counter)))
  	counterStr := string(counterBytes)
  	switch len(counterStr) {
  	case 0:
  		return "0000"
  	case 1:
  		return "000" + counterStr
  	case 2:
  		return "00" + counterStr
  	case 3:
  		return "0" + counterStr
  	default:
  		return counterStr[0:4]
  	}
  }
docs: // getAtomicCounter returns the base58 encoding of a counter which cycles through
  // the values in the range 0 to 11,316,495. This is the range that can be represented
  // with 4 base58 characters. The returned result will be padded with zeros such that
  // it is always 4 characters long.