Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: client/cmd/cipd/main.go

Issue 1870263002: cipd: instance cache (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: restore check, improve comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/cipd/internal/messages/messages.pb.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/cmd/cipd/main.go
diff --git a/client/cmd/cipd/main.go b/client/cmd/cipd/main.go
index 94d63001d897c5a63973e8d61e6e92340c72182a..1dae9573d77e1597f54aa683efda84190a81ef07 100644
--- a/client/cmd/cipd/main.go
+++ b/client/cmd/cipd/main.go
@@ -9,10 +9,13 @@
package main
import (
+ cryptorand "crypto/rand"
+ "encoding/binary"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
+ "math/rand"
"net/http"
"os"
"path/filepath"
@@ -1671,5 +1674,11 @@ func fixFlagsPosition(args []string) []string {
}
func main() {
+ var seed int64
+ if err := binary.Read(cryptorand.Reader, binary.LittleEndian, &seed); err != nil {
+ panic(err)
+ }
+ rand.Seed(seed)
+
os.Exit(subcommands.Run(application, fixFlagsPosition(os.Args[1:])))
}
« no previous file with comments | « client/cipd/internal/messages/messages.pb.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698