From d7f02b94e5585391d1675ce956acbeb6dff0b3a3 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 23 Jan 2024 21:27:05 +0800 Subject: [PATCH] chore: fix linter --- plugin/gomark/parser/blockquote.go | 2 +- plugin/gomark/parser/bold.go | 2 +- plugin/gomark/parser/code.go | 2 +- plugin/gomark/parser/embedded_content.go | 2 +- plugin/gomark/parser/escaping_character.go | 2 +- plugin/gomark/parser/heading.go | 2 +- plugin/gomark/parser/highlight.go | 2 +- plugin/gomark/parser/horizontal_rule.go | 2 +- plugin/gomark/parser/image.go | 2 +- plugin/gomark/parser/italic.go | 2 +- plugin/gomark/parser/line_break.go | 2 +- plugin/gomark/parser/link.go | 2 +- plugin/gomark/parser/math.go | 2 +- plugin/gomark/parser/math_block.go | 2 +- plugin/gomark/parser/ordered_list.go | 2 +- plugin/gomark/parser/paragraph.go | 2 +- plugin/gomark/parser/strikethrough.go | 2 +- plugin/gomark/parser/subscript.go | 2 +- plugin/gomark/parser/superscript.go | 2 +- plugin/gomark/parser/table.go | 2 +- plugin/gomark/parser/tag.go | 2 +- plugin/gomark/parser/task_list.go | 2 +- plugin/gomark/parser/unordered_list.go | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/plugin/gomark/parser/blockquote.go b/plugin/gomark/parser/blockquote.go index 83df1e35..e146c1c0 100644 --- a/plugin/gomark/parser/blockquote.go +++ b/plugin/gomark/parser/blockquote.go @@ -11,7 +11,7 @@ func NewBlockquoteParser() *BlockquoteParser { return &BlockquoteParser{} } -func (p *BlockquoteParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*BlockquoteParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/bold.go b/plugin/gomark/parser/bold.go index cb50dc5e..698fa5b8 100644 --- a/plugin/gomark/parser/bold.go +++ b/plugin/gomark/parser/bold.go @@ -11,7 +11,7 @@ func NewBoldParser() InlineParser { return &BoldParser{} } -func (p *BoldParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*BoldParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 5 { return nil, 0 diff --git a/plugin/gomark/parser/code.go b/plugin/gomark/parser/code.go index a8462ab5..9cb53725 100644 --- a/plugin/gomark/parser/code.go +++ b/plugin/gomark/parser/code.go @@ -11,7 +11,7 @@ func NewCodeParser() *CodeParser { return &CodeParser{} } -func (p *CodeParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*CodeParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/embedded_content.go b/plugin/gomark/parser/embedded_content.go index 54125d14..c42b8dd8 100644 --- a/plugin/gomark/parser/embedded_content.go +++ b/plugin/gomark/parser/embedded_content.go @@ -11,7 +11,7 @@ func NewEmbeddedContentParser() *EmbeddedContentParser { return &EmbeddedContentParser{} } -func (p *EmbeddedContentParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*EmbeddedContentParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 5 { return nil, 0 diff --git a/plugin/gomark/parser/escaping_character.go b/plugin/gomark/parser/escaping_character.go index bbae9f79..afe6fc37 100644 --- a/plugin/gomark/parser/escaping_character.go +++ b/plugin/gomark/parser/escaping_character.go @@ -11,7 +11,7 @@ func NewEscapingCharacterParser() *EscapingCharacterParser { return &EscapingCharacterParser{} } -func (p *EscapingCharacterParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*EscapingCharacterParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { if len(tokens) < 2 { return nil, 0 } diff --git a/plugin/gomark/parser/heading.go b/plugin/gomark/parser/heading.go index 010074c9..ff94fbed 100644 --- a/plugin/gomark/parser/heading.go +++ b/plugin/gomark/parser/heading.go @@ -11,7 +11,7 @@ func NewHeadingParser() *HeadingParser { return &HeadingParser{} } -func (p *HeadingParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*HeadingParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) spaceIndex := tokenizer.FindUnescaped(matchedTokens, tokenizer.Space) if spaceIndex < 0 { diff --git a/plugin/gomark/parser/highlight.go b/plugin/gomark/parser/highlight.go index ffe6a0c4..ede94964 100644 --- a/plugin/gomark/parser/highlight.go +++ b/plugin/gomark/parser/highlight.go @@ -11,7 +11,7 @@ func NewHighlightParser() InlineParser { return &HighlightParser{} } -func (p *HighlightParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*HighlightParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedToken := tokenizer.GetFirstLine(tokens) if len(matchedToken) < 5 { return nil, 0 diff --git a/plugin/gomark/parser/horizontal_rule.go b/plugin/gomark/parser/horizontal_rule.go index a163afc3..0edf4e3d 100644 --- a/plugin/gomark/parser/horizontal_rule.go +++ b/plugin/gomark/parser/horizontal_rule.go @@ -11,7 +11,7 @@ func NewHorizontalRuleParser() *HorizontalRuleParser { return &HorizontalRuleParser{} } -func (p *HorizontalRuleParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*HorizontalRuleParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/image.go b/plugin/gomark/parser/image.go index fe596567..d1366d17 100644 --- a/plugin/gomark/parser/image.go +++ b/plugin/gomark/parser/image.go @@ -11,7 +11,7 @@ func NewImageParser() *ImageParser { return &ImageParser{} } -func (p *ImageParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*ImageParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 5 { return nil, 0 diff --git a/plugin/gomark/parser/italic.go b/plugin/gomark/parser/italic.go index e55a370c..3c93a8d0 100644 --- a/plugin/gomark/parser/italic.go +++ b/plugin/gomark/parser/italic.go @@ -13,7 +13,7 @@ func NewItalicParser() *ItalicParser { return &ItalicParser{} } -func (p *ItalicParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*ItalicParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/line_break.go b/plugin/gomark/parser/line_break.go index 9122bb1d..7df34f54 100644 --- a/plugin/gomark/parser/line_break.go +++ b/plugin/gomark/parser/line_break.go @@ -11,7 +11,7 @@ func NewLineBreakParser() *LineBreakParser { return &LineBreakParser{} } -func (p *LineBreakParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*LineBreakParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { if len(tokens) == 0 { return nil, 0 } diff --git a/plugin/gomark/parser/link.go b/plugin/gomark/parser/link.go index f7d883c3..9c38740e 100644 --- a/plugin/gomark/parser/link.go +++ b/plugin/gomark/parser/link.go @@ -11,7 +11,7 @@ func NewLinkParser() *LinkParser { return &LinkParser{} } -func (p *LinkParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*LinkParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 5 { return nil, 0 diff --git a/plugin/gomark/parser/math.go b/plugin/gomark/parser/math.go index 7105db2f..2fda2e8a 100644 --- a/plugin/gomark/parser/math.go +++ b/plugin/gomark/parser/math.go @@ -11,7 +11,7 @@ func NewMathParser() *MathParser { return &MathParser{} } -func (p *MathParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*MathParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/math_block.go b/plugin/gomark/parser/math_block.go index e7bc326d..4fd9cc4b 100644 --- a/plugin/gomark/parser/math_block.go +++ b/plugin/gomark/parser/math_block.go @@ -11,7 +11,7 @@ func NewMathBlockParser() *MathBlockParser { return &MathBlockParser{} } -func (p *MathBlockParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*MathBlockParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { rows := tokenizer.Split(tokens, tokenizer.Newline) if len(rows) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/ordered_list.go b/plugin/gomark/parser/ordered_list.go index 5c3ac2eb..9e8db9e7 100644 --- a/plugin/gomark/parser/ordered_list.go +++ b/plugin/gomark/parser/ordered_list.go @@ -11,7 +11,7 @@ func NewOrderedListParser() *OrderedListParser { return &OrderedListParser{} } -func (p *OrderedListParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*OrderedListParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) indent := 0 for _, token := range matchedTokens { diff --git a/plugin/gomark/parser/paragraph.go b/plugin/gomark/parser/paragraph.go index a838be72..af8e7ed7 100644 --- a/plugin/gomark/parser/paragraph.go +++ b/plugin/gomark/parser/paragraph.go @@ -13,7 +13,7 @@ func NewParagraphParser() *ParagraphParser { return &ParagraphParser{} } -func (p *ParagraphParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*ParagraphParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) == 0 { return nil, 0 diff --git a/plugin/gomark/parser/strikethrough.go b/plugin/gomark/parser/strikethrough.go index 7f853eb2..159a7a33 100644 --- a/plugin/gomark/parser/strikethrough.go +++ b/plugin/gomark/parser/strikethrough.go @@ -11,7 +11,7 @@ func NewStrikethroughParser() *StrikethroughParser { return &StrikethroughParser{} } -func (p *StrikethroughParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*StrikethroughParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 5 { return nil, 0 diff --git a/plugin/gomark/parser/subscript.go b/plugin/gomark/parser/subscript.go index 27cdfca0..8c6a889a 100644 --- a/plugin/gomark/parser/subscript.go +++ b/plugin/gomark/parser/subscript.go @@ -11,7 +11,7 @@ func NewSubscriptParser() *SubscriptParser { return &SubscriptParser{} } -func (p *SubscriptParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*SubscriptParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/superscript.go b/plugin/gomark/parser/superscript.go index 68510873..f9f62f35 100644 --- a/plugin/gomark/parser/superscript.go +++ b/plugin/gomark/parser/superscript.go @@ -11,7 +11,7 @@ func NewSuperscriptParser() *SuperscriptParser { return &SuperscriptParser{} } -func (p *SuperscriptParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*SuperscriptParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/table.go b/plugin/gomark/parser/table.go index 20a134fb..7d776d32 100644 --- a/plugin/gomark/parser/table.go +++ b/plugin/gomark/parser/table.go @@ -11,7 +11,7 @@ func NewTableParser() *TableParser { return &TableParser{} } -func (p *TableParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*TableParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { rawRows := tokenizer.Split(tokens, tokenizer.Newline) if len(rawRows) < 3 { return nil, 0 diff --git a/plugin/gomark/parser/tag.go b/plugin/gomark/parser/tag.go index 221b74ae..0d2ec067 100644 --- a/plugin/gomark/parser/tag.go +++ b/plugin/gomark/parser/tag.go @@ -11,7 +11,7 @@ func NewTagParser() *TagParser { return &TagParser{} } -func (p *TagParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*TagParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) if len(matchedTokens) < 2 { return nil, 0 diff --git a/plugin/gomark/parser/task_list.go b/plugin/gomark/parser/task_list.go index 8e5d1166..339eda84 100644 --- a/plugin/gomark/parser/task_list.go +++ b/plugin/gomark/parser/task_list.go @@ -11,7 +11,7 @@ func NewTaskListParser() *TaskListParser { return &TaskListParser{} } -func (p *TaskListParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*TaskListParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) indent := 0 for _, token := range matchedTokens { diff --git a/plugin/gomark/parser/unordered_list.go b/plugin/gomark/parser/unordered_list.go index e4148f02..65cfc416 100644 --- a/plugin/gomark/parser/unordered_list.go +++ b/plugin/gomark/parser/unordered_list.go @@ -11,7 +11,7 @@ func NewUnorderedListParser() *UnorderedListParser { return &UnorderedListParser{} } -func (p *UnorderedListParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { +func (*UnorderedListParser) Match(tokens []*tokenizer.Token) (ast.Node, int) { matchedTokens := tokenizer.GetFirstLine(tokens) indent := 0 for _, token := range matchedTokens {