Skip to content

Commit 8f6848e

Browse files
committed
feat: new output README.md
1 parent e38b8d6 commit 8f6848e

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

leetcode/problem.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,14 @@ func (p Problem) OutputReadMe() error {
7474
}
7575
return path.OverwriteFile(
7676
filepath.Join(".", p.dirName(), "README.md"),
77-
fmt.Sprintf("# %s. %s", p.Question.QuestionId, p.Question.QuestionTitle), "",
78-
fmt.Sprintf("[Description](%s) | ", p.Question.Referer),
79-
fmt.Sprintf("[Discuss](%s) | ", fmt.Sprintf(
80-
"https://leetcode.com/problems/%s/discuss/",
81-
p.Question.TitleSlug,
82-
)),
83-
fmt.Sprintf("[Solution](%s)", fmt.Sprintf(
84-
"https://leetcode.com/problems/%s/solution/",
85-
p.Question.TitleSlug,
86-
)),
87-
"", "## Description", "",
88-
p.ReadMe(),
77+
fmt.Sprintf("# [%s. %s](%s)",
78+
p.Question.QuestionId, p.Question.QuestionTitle, p.Question.Referer), "",
79+
"## Description", "",
80+
p.ReadMe(), "",
81+
"## Solution",
82+
fmt.Sprintf("- [Code](%s.go)", p.packageName()),
83+
fmt.Sprintf("- [Testing](%s_test.go)", p.packageName()), "",
84+
"## Note", "- [English](NOTE.md)", "- [中文](NOTE_Ch-zh.md)",
8985
)
9086
}
9187

0 commit comments

Comments
 (0)