working commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
func makeTmpFileName(prefix string) string {
|
||||
randBytes := make([]byte, 6)
|
||||
rand.Read(randBytes)
|
||||
suffix := hex.EncodeToString(randBytes)
|
||||
return fmt.Sprintf("%s.tmp.%s", prefix, suffix)
|
||||
}
|
||||
Reference in New Issue
Block a user