<div dir="ltr"><div><div>Hi folks,<br><br></div>In alm-core we have error types defined inside models/errors.go<br><a href="https://github.com/almighty/almighty-core/blob/master/models/errors.go">https://github.com/almighty/almighty-core/blob/master/models/errors.go</a><br><br>To construct an error we do a :<br>InternalError{<b>s</b>impleError{err.<span class="gmail-pl-c1">Error</span>()}}<br><br>which means that we can't access these outside the models package since simpleError is non-exported.<br><br></div>What would be the recommended approach for defining and using error types in other packages? <br><br>Should the packages have their own errors.go , <br>or <br>should we modify models/errors.go to make it usable from outside?<br><div><div><br><br><br>--<br></div><div>Shoubhik<br></div></div></div>