Skip to content
Snippets Groups Projects
MessageWithRefToError.go 194 B
Newer Older
  • Learn to ignore specific revisions
  • package errcore
    
    import (
    	"errors"
    	"fmt"
    )
    
    func MessageWithRefToError(msg string, reference interface{}) error {
    	return errors.New(fmt.Sprintf(
    		messageMapFormat,
    		msg,
    		reference),
    	)
    }