Skip to content

Commit ccb330d

Browse files
author
openset
committed
Add: v1.4.3
1 parent e9695f9 commit ccb330d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Diff for: internal/leetcode/question_data.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ func QuestionData(titleSlug string, isForce bool, graphQL ...string) (qd questio
2727
if len(graphQL) == 0 {
2828
graphQL = []string{graphQLCnUrl}
2929
}
30-
filename := fmt.Sprintf(questionDataFile, slugToSnake(titleSlug))
30+
name := fmt.Sprintf(questionDataFile, slugToSnake(titleSlug))
31+
filename := getCachePath(name)
3132
oldContent := getContent(filename)
32-
graphQLRequest(graphQL[0], jsonStr, filename, days, &qd)
33+
graphQLRequest(graphQL[0], jsonStr, name, days, &qd)
3334
if qd.Data.Question.Content == "" && oldContent != "" {
3435
qd.Data.Question.Content = oldContent
3536
filePutContents(filename, jsonEncode(qd))
3637
}
3738
if qd.Data.Question.TitleSlug == "" {
38-
_ = os.Remove(getCachePath(filename))
39+
os.Remove(filename)
3940
if graphQL[0] == graphQLCnUrl {
4041
return QuestionData(titleSlug, isForce, graphQLUrl)
4142
}

Diff for: internal/version/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/openset/leetcode/internal/base"
88
)
99

10-
const version = "1.4.2"
10+
const version = "1.4.3"
1111

1212
var CmdVersion = &base.Command{
1313
Run: runVersion,

0 commit comments

Comments
 (0)