To build and run rand.go
you can do something like:
go build rand.go
./rand
# or
go build -o someothernameforexecutable rand.go
./someothernameforexecutable
# building without debug symbols (smaller file size)
go build -ldflags '-s -w' rand.go
ls -la rand