@ -225,6 +225,8 @@ func main1() int {
}
func mainErr ( args [ ] string ) error {
// TODO(mvdan): only run this once at the very beginning, then set the
// GOPRIVATE env var.
out , err := exec . Command ( "go" , "env" , "GOPRIVATE" ) . CombinedOutput ( )
if err != nil {
return fmt . Errorf ( "%v: %s" , err , out )
@ -257,7 +259,7 @@ func mainErr(args []string) error {
seed = make ( [ ] byte , 16 ) // random 128 bit seed
if _ , err := rand . Read ( seed ) ; err != nil {
return fmt . Errorf ( " E rror generating random seed: %v", err )
return fmt . Errorf ( " e rror generating random seed: %v", err )
}
flagSeed = "random;" + base64 . StdEncoding . EncodeToString ( seed )
@ -433,7 +435,7 @@ func transformCompile(args []string) ([]string, error) {
if envGarbleSeed != "" {
seed , err = base64 . StdEncoding . DecodeString ( strings . TrimPrefix ( envGarbleSeed , "random;" ) )
if err != nil {
return nil , fmt . Errorf ( " Error decoding base64 encoded seed: %v", err )
return nil , fmt . Errorf ( " error decoding base64 seed: %v", err )
}
mathrand . Seed ( int64 ( binary . BigEndian . Uint64 ( seed ) ) )