File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ func (blder *Builder) WithValidatePath(path string) *Builder {
5454 return blder
5555}
5656
57- func (blder * Builder ) WithConvertPath (prefix string ) * Builder {
57+ func (blder * Builder ) WithConvertPath (path string ) * Builder {
58+ blder .pathConvert = path
5859 return blder
5960}
6061
@@ -88,10 +89,10 @@ func (blder *Builder) Complete(i interface{}) error {
8889 } else if ! strings .HasPrefix (blder .prefixValidate , "/" ) {
8990 return fmt .Errorf ("validating prefix %q must start with '/'" , blder .prefixValidate )
9091 }
91- if blder .pathConvert != "" && ! strings .HasPrefix (blder .pathValidate , "/" ) {
92- return fmt .Errorf ("validating path %q must start with '/'" , blder .pathValidate )
92+ if blder .pathConvert != "" && ! strings .HasPrefix (blder .pathConvert , "/" ) {
93+ return fmt .Errorf ("conversion path %q must start with '/'" , blder .pathConvert )
9394 } else if ! strings .HasPrefix (blder .prefixValidate , "/" ) {
94- return fmt .Errorf ("validating prefix %q must start with '/'" , blder .prefixValidate )
95+ return fmt .Errorf ("conversion prefix %q must start with '/'" , blder .prefixConvert )
9596 }
9697
9798 if validator , ok := i .(Validator ); ok {
You can’t perform that action at this time.
0 commit comments