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 4b6e0de

Browse files
author
Shuo
authored
Merge pull request #667 from openset/develop
Add: IsSolved
2 parents b63e930 + 7a6932f commit 4b6e0de

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎internal/leetcode/problems_status.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
package leetcode
22

3-
var ProblemStatus = map[int]bool{
3+
// 状态
4+
func IsSolved(id int) bool {
5+
return problemStatus[id]
6+
}
7+
8+
var problemStatus = map[int]bool{
49
1: true,
510
2: true,
611
3: true,

‎internal/post/post.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func runPost(cmd *base.Command, args []string) {
8484
oldPath := filepath.Join(basePath, "leetcode", filename)
8585
newPath := filepath.Join(basePath, "_posts", filename)
8686
base.FilePutContents(oldPath, buf.Bytes())
87-
if leetcode.ProblemStatus[questionId] {
87+
if leetcode.IsSolved(questionId) {
8888
_ = os.Rename(oldPath, newPath)
8989
} else {
9090
_ = os.Remove(newPath)

0 commit comments

Comments
(0)

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