github.com/sohaha/zlsgo@v1.7.13-0.20240501141223-10dd1a906f76/zstring/rand_118.go (about)

     1  //go:build go1.18
     2  // +build go1.18
     3  
     4  package zstring
     5  
     6  import (
     7  	_ "unsafe"
     8  )
     9  
    10  //go:noescape
    11  //go:linkname fastrand runtime.fastrand
    12  func fastrand() uint32
    13  
    14  func RandUint32() uint32 {
    15  	return fastrand()
    16  }