func IfParticipantByTaskID(userID, company string, taskID int) (bool, error) { var count int err := db.Model(&Identitylink{}).Where("user_id=? and company=? and task_id=?", userID, company, taskID).Count(&count).Error if err != nil { if err == gorm.ErrRecordNotFound ...