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 ede3bc1

Browse files
author
Sandy
authored
Merge pull request #27 from openset/develop
Update: CmdReadme
2 parents d406e87 + b749f87 commit ede3bc1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎internal/readme/readme.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ func runReadme(cmd *base.Command, args []string) {
2121
if len(args) != 0 {
2222
cmd.Usage()
2323
}
24-
wb :=bytes.NewBuffer(nil)
24+
varwb bytes.Buffer
2525
wb.WriteString(defaultStr)
26-
writeProblems(wb)
26+
writeProblems(&wb)
2727
err := ioutil.WriteFile("README.md", wb.Bytes(), 0644)
2828
base.CheckErr(err)
2929
}
@@ -37,8 +37,8 @@ func writeProblems(wb *bytes.Buffer) {
3737
title := strings.TrimSpace(problem.Stat.QuestionTitle)
3838
slug := problem.Stat.QuestionTitleSlug
3939
levelName := problem.Difficulty.LevelName()
40-
format := "| %d | [%s](https://leetcode.com/problems/%s) | [Go](https://github.com/openset/leetcode/tree/master/solution/%s) | %s |\n"
41-
problemsSet[id] = fmt.Sprintf(format, id, title, slug, slug, levelName)
40+
format := "| <span id=\"%d\">%d</span> | [%s](https://leetcode.com/problems/%s) | [Go](https://github.com/openset/leetcode/tree/master/solution/%s) | %s |\n"
41+
problemsSet[id] = fmt.Sprintf(format, id, id, title, slug, slug, levelName)
4242
if id > maxId {
4343
maxId = id
4444
}

‎internal/version/version.go

Lines changed: 1 addition & 1 deletion
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 = "0.0.1"
10+
const version = "0.1.0"
1111

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

0 commit comments

Comments
(0)

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