Skip to content

Commit

Permalink
specs: add rightPadder
Browse files Browse the repository at this point in the history
Fixes: #155
  • Loading branch information
adamdecaf committed Jan 18, 2022
1 parent 605da49 commit 2a7815c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions specs/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ var (
}

PaddersIntToExt = map[string]string{
"leftPadder": "Left",
"nonePadder": "None",
"leftPadder": "Left",
"rightPadder": "Right",
"nonePadder": "None",
}

PaddersExtToInt = map[string]func(pad string) padding.Padder{
Expand All @@ -87,6 +88,12 @@ var (
}
return nil
},
"Right": func(pad string) padding.Padder {
if runes := []rune(pad); len(runes) == 1 {
return padding.Right(runes[0])
}
return nil
},
"None": func(pad string) padding.Padder { return padding.None },
}

Expand Down

0 comments on commit 2a7815c

Please sign in to comment.