all: gofmt -w -r 'interface{} -> any' .

Updates #9687
This commit is contained in:
Bjørn Erik Pedersen 2022-03-17 22:03:27 +01:00
parent 423594e03a
commit b80853de90
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
342 changed files with 2118 additions and 2102 deletions

View file

@ -58,8 +58,8 @@ func New(cfg Config) Highlighter {
}
type Highlighter interface {
Highlight(code, lang string, opts interface{}) (string, error)
HighlightCodeBlock(ctx hooks.CodeblockContext, opts interface{}) (HightlightResult, error)
Highlight(code, lang string, opts any) (string, error)
HighlightCodeBlock(ctx hooks.CodeblockContext, opts any) (HightlightResult, error)
hooks.CodeBlockRenderer
hooks.IsDefaultCodeBlockRendererProvider
}
@ -68,7 +68,7 @@ type chromaHighlighter struct {
cfg Config
}
func (h chromaHighlighter) Highlight(code, lang string, opts interface{}) (string, error) {
func (h chromaHighlighter) Highlight(code, lang string, opts any) (string, error) {
cfg := h.cfg
if err := applyOptions(opts, &cfg); err != nil {
return "", err
@ -82,7 +82,7 @@ func (h chromaHighlighter) Highlight(code, lang string, opts interface{}) (strin
return b.String(), nil
}
func (h chromaHighlighter) HighlightCodeBlock(ctx hooks.CodeblockContext, opts interface{}) (HightlightResult, error) {
func (h chromaHighlighter) HighlightCodeBlock(ctx hooks.CodeblockContext, opts any) (HightlightResult, error) {
cfg := h.cfg
var b strings.Builder