15 lines
253 B
Go
15 lines
253 B
Go
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)
|
|
}
|