Skip to content

Commit 96a23a5

Browse files
author
Openset
committed
Update: getSimilarQuestion
1 parent 9fee9a7 commit 96a23a5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: internal/leetcode/question_data.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package leetcode
22

33
import (
44
"bytes"
5-
"encoding/json"
65
"fmt"
76
"path"
87
"regexp"
@@ -117,9 +116,7 @@ func (question questionType) getTopicTags() []byte {
117116

118117
func (question questionType) getSimilarQuestion() []byte {
119118
var sq []similarQuestionType
120-
if question.SimilarQuestions != "" {
121-
json.Unmarshal([]byte(question.SimilarQuestions), &sq)
122-
}
119+
jsonDecode([]byte(question.SimilarQuestions), &sq)
123120
var buf bytes.Buffer
124121
if len(sq) > 0 {
125122
buf.WriteString("\n### Similar Questions\n")

0 commit comments

Comments
 (0)