生成没有时间的随机字符串?

I know how to generate a random string in go using Runes & seeding rand.Init with time.UnixNano(). My question is, is it possible (with the stdlib) to seed rand without using the current timestamp (secure)?

Furthermore, I ask because isn't just relying on time to generate a random string for a sensitive operation insecure/a vulnerability?

For sensitive operations use crypto/rand instead of math/rand:

Package [crypto/] rand implements a cryptographically secure random number generator.

Note that you don't need (you can't) seed crypto/rand.

You can seed it with anything, it just takes an integer. Time is commonly used because it changes and there aren't a lot of sources for good random seeds that aren't constant - if you use the same seed, you'll get the same sequence of values, so typically you want something that changes.

Is it insecure? Absolutely! If you need secure random number generation, you must use crypto/rand instead: https://golang.org/pkg/crypto/rand/

crypto/rand does not offer a way to seed it because it's seeded using the system's cryptographically-strong random number generator.