rand.Seed(SEED) is deprecated, how to use NewRand(NewSeed( ) )?

The Go 1.20 Seed documentation has a typo. Use rand.New(rand.NewSource(seed)) as described in the latest documentation and the Go 1.20 release notes. Create the random source and use methods on the source instead of calling the package functions: r := rand.New(rand.NewSource(seed)) fmt.Println(r.Uint64()) fmt.Println(r.Uint64())

How to return dynamic type struct in Golang?

Yes it’s possible however your function should return interface{} and not []*interface. func (c Helper) ReturnModels(modelName string) interface{} {} In this case you could use Type Switches and/or Type Assertions to cast the return value into it’s original type. Example Note: I’ve never used Revel, but the following snippet should give you an a general … Read more