File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -159,14 +159,14 @@ func (o *Options) Complete(f cmdutil.Factory, args []string) error {
159
159
var re string
160
160
if strings .HasPrefix (o .inputFieldPath , gotGVR .Resource ) {
161
161
// E.g., "nodes.*spec" -> ".*spec"
162
- re = strings .TrimLeft (o .inputFieldPath , gotGVR .Resource )
162
+ re = strings .TrimPrefix (o .inputFieldPath , gotGVR .Resource )
163
163
} else if strings .HasPrefix (o .inputFieldPath , singularResource (gotGVR .Resource )) {
164
164
// E.g., "node.*spec" -> ".*spec"
165
- re = strings .TrimLeft (o .inputFieldPath , singularResource (gotGVR .Resource ))
165
+ re = strings .TrimPrefix (o .inputFieldPath , singularResource (gotGVR .Resource ))
166
166
} else {
167
167
// E.g., "no.*spec" -> ".*spec"
168
- left := o .inputFieldPath [:idx ]
169
- re = strings .TrimLeft (o .inputFieldPath , left )
168
+ prefix := o .inputFieldPath [:idx ]
169
+ re = strings .TrimPrefix (o .inputFieldPath , prefix )
170
170
}
171
171
o .inputFieldPathRegex , err = regexp .Compile (re )
172
172
if err != nil {
You can’t perform that action at this time.
0 commit comments