File tree 1 file changed +5
-4
lines changed
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 {
54
54
return blder
55
55
}
56
56
57
- func (blder * Builder ) WithConvertPath (prefix string ) * Builder {
57
+ func (blder * Builder ) WithConvertPath (path string ) * Builder {
58
+ blder .pathConvert = path
58
59
return blder
59
60
}
60
61
@@ -88,10 +89,10 @@ func (blder *Builder) Complete(i interface{}) error {
88
89
} else if ! strings .HasPrefix (blder .prefixValidate , "/" ) {
89
90
return fmt .Errorf ("validating prefix %q must start with '/'" , blder .prefixValidate )
90
91
}
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 )
93
94
} 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 )
95
96
}
96
97
97
98
if validator , ok := i .(Validator ); ok {
You can’t perform that action at this time.
0 commit comments