Skip to content

Commit 77d7d50

Browse files
committed
fmt
1 parent 09eac3f commit 77d7d50

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

pkg/printer/printer.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"io"
88
"os"
9-
"strings"
9+
"strings"
1010

1111
"github.com/alecthomas/chroma/v2"
1212
"github.com/alecthomas/chroma/v2/formatters"
@@ -82,13 +82,12 @@ type PrintInput struct {
8282

8383
func (p *Printer) Print(ipt *PrintInput) error {
8484
// read source
85-
// b, err := io.ReadAll(ipt.In)
86-
strB := new(strings.Builder)
87-
_,err := io.Copy(strB, ipt.In)
88-
if err != nil {
89-
return err
90-
}
91-
src := strB.String()
85+
b := new(strings.Builder)
86+
if _, err := io.Copy(b, ipt.In); err != nil {
87+
return err
88+
}
89+
src := b.String()
90+
9291
// get lexer
9392
var l chroma.Lexer
9493
if p.lang == "" {

0 commit comments

Comments
 (0)