Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
  • Loading branch information
CabinfeverB committed Jan 31, 2024
1 parent 9af0147 commit a7ce8e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/parser/format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const (
// Formatter is an io.Writer extended formatter by a fmt.Printf like function Format.
type Formatter interface {
io.Writer
Format(format string, args ...any) (n int, errno error)
Format(format string, args ...interface{}) (n int, errno error)
}

type indentFormatter struct {
Expand Down Expand Up @@ -82,7 +82,7 @@ func IndentFormatter(w io.Writer, indent string) Formatter {
return &indentFormatter{w, []byte(indent), 0, stBOL}
}

func (f *indentFormatter) format(flat bool, format string, args ...any) (n int, errno error) {
func (f *indentFormatter) format(flat bool, format string, args ...interface{}) (n int, errno error) {
var buf = make([]byte, 0)
for i := 0; i < len(format); i++ {
c := format[i]
Expand Down Expand Up @@ -161,7 +161,7 @@ func (f *indentFormatter) format(flat bool, format string, args ...any) (n int,
}

// Format implements Format interface.
func (f *indentFormatter) Format(format string, args ...any) (n int, errno error) {
func (f *indentFormatter) Format(format string, args ...interface{}) (n int, errno error) {
return f.format(false, format, args...)
}

Expand All @@ -187,7 +187,7 @@ func FlatFormatter(w io.Writer) Formatter {
}

// Format implements Format interface.
func (f *flatFormatter) Format(format string, args ...any) (n int, errno error) {
func (f *flatFormatter) Format(format string, args ...interface{}) (n int, errno error) {
return (*indentFormatter)(f).format(true, format, args...)
}

Expand Down Expand Up @@ -448,7 +448,7 @@ func (ctx *RestoreCtx) WritePlain(plainText string) {
}

// WritePlainf write the plain text into writer without any handling.
func (ctx *RestoreCtx) WritePlainf(format string, a ...any) {
func (ctx *RestoreCtx) WritePlainf(format string, a ...interface{}) {
fmt.Fprintf(ctx.In, format, a...)
}

Expand Down

0 comments on commit a7ce8e5

Please sign in to comment.