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.

39 lines
526 B

package main
import (
"errs/wrap"
"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() {
a := fmt.Errorf("UnError")
//a = nil
e := wrap.WithCause(wrap.WithInfo(wrap.WithMessage(a,"Esto es un mensage")),wrap.ErrCode("cidd"))
fmt.Printf(e.String())
}

Powered by TurnKey Linux.