Skip to content

Commit

Permalink
Simplify using %T instead of reflect.TypeOf
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Ciatti <rciatti@redhat.com>
  • Loading branch information
Roberto Ciatti committed Jul 31, 2020
1 parent 5e320d7 commit c4a16e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/asset/installconfig/ovirt/validaton.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package ovirt

import (
"fmt"
"reflect"

ovirtsdk "github.com/ovirt/go-ovirt"
"github.com/pkg/errors"
Expand Down Expand Up @@ -131,7 +130,7 @@ func validateVNICProfile(platform ovirt.Platform, con *ovirtsdk.Connection) erro
func validURL(val interface{}) error {
uri, ok := val.(string)
if !ok {
return fmt.Errorf("cannot check url validity on type %v", reflect.TypeOf(val).Name())
return fmt.Errorf("cannot check url validity on type %T", val)
}

return validate.URIWithProtocol(uri, "https")
Expand Down

0 comments on commit c4a16e9

Please sign in to comment.