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.

43 lines
749 B

package main
import (
"errs/erstr"
"errs/wrap"
"fmt"
"math/rand"
"time"
"typs/strs"
)
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 := wrap.ErrCode("UnError")
//a = nil
erstr.G.Transformers = append(erstr.G.Transformers, strs.TransformFnc(erstr.RemoveLabel), strs.G.Transformers.GetOrDefault("upper"))
e := wrap.WithCause(wrap.WithInfo(wrap.WithMessage(a,"Esto es un mensage")),wrap.WithMessage(wrap.ErrCode("cidd"),"El mensaje de la causa"))
fmt.Printf(erstr.StringifyError("",e))
}

Powered by TurnKey Linux.