From d9200cd713124bcfc2d3eed44263780e8e9b78fa Mon Sep 17 00:00:00 2001 From: openset Date: Fri, 15 Nov 2019 12:05:49 +0800 Subject: [PATCH] v1.5.0 --- internal/leetcode/question_data.go | 2 +- internal/leetcode/topic_tag.go | 2 +- internal/version/version.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/leetcode/question_data.go b/internal/leetcode/question_data.go index 2b6c01d68..c03c3721d 100644 --- a/internal/leetcode/question_data.go +++ b/internal/leetcode/question_data.go @@ -255,7 +255,7 @@ func (question *questionType) SaveCodeSnippet() { func (question *questionType) saveCodeContent(content, ext string, permX ...bool) { filePath := question.getFilePath(question.TitleSnake() + ext) filePutContents(filePath, []byte(content)) - if len(permX) > 0 && permX[0] == true { + if len(permX) > 0 && permX[0] { _ = os.Chmod(filePath, 0755) } } diff --git a/internal/leetcode/topic_tag.go b/internal/leetcode/topic_tag.go index 797f3c9fc..209976664 100644 --- a/internal/leetcode/topic_tag.go +++ b/internal/leetcode/topic_tag.go @@ -131,7 +131,7 @@ func (question *ttQuestionType) TagsStr() string { buf.WriteString(fmt.Sprintf(format, tag.name(), tag.Slug)) } saveTags(question.TopicTags) - return string(buf.Bytes()) + return buf.String() } // SaveContents - leetcode.SaveContents diff --git a/internal/version/version.go b/internal/version/version.go index 12e4c2195..0bba7b8e8 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -8,7 +8,7 @@ import ( "github.com/openset/leetcode/internal/base" ) -const version = "1.4.9" +const version = "1.5.0" // CmdVersion - version.CmdVersion var CmdVersion = &base.Command{