Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d4001ff

Browse files
author
Shuo
authored
Merge pull request #586 from openset/develop
Update: CmdPost
2 parents 5205c89 + 36573df commit d4001ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎internal/post/post.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"os"
77
"path"
88
"regexp"
9-
"strconv"
109
"strings"
1110
"time"
1211

@@ -31,12 +30,12 @@ func runPost(cmd *base.Command, args []string) {
3130
formatSimilarQuestion := " 1. [%s](/%s)%s\n"
3231
problems := leetcode.ProblemsAll()
3332
for _, problem := range problems.StatStatusPairs {
33+
questionId := problem.Stat.FrontendQuestionId
3434
titleSlug := problem.Stat.QuestionTitleSlug
3535
question := leetcode.QuestionData(titleSlug, false).Data.Question
3636
if question.TranslatedContent != "" {
37-
fmt.Println(question.QuestionFrontendId, "\t"+question.TranslatedTitle, "saving...")
37+
fmt.Println(questionId, "\t"+question.TranslatedTitle, "saving...")
3838
var buf bytes.Buffer
39-
questionId, _ := strconv.Atoi(question.QuestionFrontendId)
4039
t := time.Date(2016, 1, 1, 21, 30, 0, 0, time.Local)
4140
t = t.AddDate(0, 0, questionId)
4241
var tags []string
@@ -131,6 +130,7 @@ var inPosts = map[int]bool{
131130
2: true,
132131
3: true,
133132
4: true,
133+
6: true,
134134
7: true,
135135
8: true,
136136
9: true,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /