AnswerURL get answer url
(permalink int, siteUrl, questionID, title, answerID string)
| 42 | |
| 43 | // AnswerURL get answer url |
| 44 | func AnswerURL(permalink int, siteUrl, questionID, title, answerID string) string { |
| 45 | if permalink == constant.PermalinkQuestionIDAndTitle || |
| 46 | permalink == constant.PermalinkQuestionID { |
| 47 | answerID = uid.DeShortID(answerID) |
| 48 | } else { |
| 49 | answerID = uid.EnShortID(answerID) |
| 50 | } |
| 51 | return QuestionURL(permalink, siteUrl, questionID, title) + "/" + answerID |
| 52 | } |
| 53 | |
| 54 | // CommentURL get comment url |
| 55 | func CommentURL(permalink int, siteUrl, questionID, title, answerID, commentID string) string { |
no test coverage detected