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) }