This question already has an answer here:
- Formatted errors.New 1 answer
I've grown fond of the Printf
of fmt
and log
Is there a way I can use it with errors.New
?
I tried the following:
return errors.New(fmt.Printf("User %v already exists", dbcfg.Username))
</div>