Skip to content

Commit

Permalink
pkg/pdfcpu/form: Change string() to String()
Browse files Browse the repository at this point in the history
The method String() is the Golang standard interface
to stringify an object.

See the Stringer interface from the fmt package.
  • Loading branch information
sbourlon committed Jan 4, 2024
1 parent e33b502 commit 7576369
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/pdfcpu/form/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const (
FTRadioButtonGroup
)

func (ft FieldType) string() string {
func (ft FieldType) String() string {
var s string
switch ft {
case FTText:
Expand Down Expand Up @@ -772,7 +772,7 @@ func renderMultiPageFields(ctx *model.Context, m map[string][]Field, fm *FieldMe
l = "*"
}

t := f.Typ.string()
t := f.Typ.String()

pageFill := strings.Repeat(" ", fm.pageMax-runewidth.StringWidth(f.pageString()))
idFill := strings.Repeat(" ", fm.idMax-runewidth.StringWidth(f.ID))
Expand Down Expand Up @@ -845,7 +845,7 @@ func renderFields(ctx *model.Context, fs []Field, fm *FieldMeta) ([]string, erro
l = "*"
}

t := f.Typ.string()
t := f.Typ.String()

pageFill := strings.Repeat(" ", fm.pageMax-runewidth.StringWidth(f.pageString()))
idFill := strings.Repeat(" ", fm.idMax-runewidth.StringWidth(f.ID))
Expand Down

0 comments on commit 7576369

Please sign in to comment.