You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
555 B

package main
import (
"aflds"
"fmt"
"math/rand"
"time"
)
type (
S = struct {
A string
}
)
func Una () S {
fmt.Println("Es llamado ")
return S { A : "Un valiue" }
}
func randomInt(min, max int) int {
rand.Seed(time.Now().UnixNano()) // Semilla para generar números aleatorios únicos
return rand.Intn(max-min+1) + min
}
func main() {
doInt := aflds.NewDFieldInt("Mi",func()int{ return randomInt(1, 100000) })
fmt.Printf("1 - %v\n",doInt.Value())
fmt.Printf("2 - %v\n",doInt.Value())
fmt.Printf("3 - %v\n",doInt.Value())
}

Powered by TurnKey Linux.