Package A
func Validate(){
db.CheckPresent() //how to mock this function which is in another package
return nil
}
I am writing test case in Golang to test a function which calls CheckPresent()
function from another package. How to mock CheckPresent()
fuction?