Skip to content

Commit

Permalink
refactor: remove iface
Browse files Browse the repository at this point in the history
Signed-off-by: Shiwei Zhang <[email protected]>
  • Loading branch information
shizhMSFT committed Feb 26, 2025
1 parent 1a859db commit e6f5c53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/oras/internal/option/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ func fields[T any](ptr any) iter.Seq[T] {
for i := 0; i < v.NumField(); i++ {
f := v.Field(i)
if f.CanSet() {
iface := f.Addr().Interface()
if opts, ok := iface.(T); ok {
if opts, ok := f.Addr().Interface().(T); ok {
if !yield(opts) {
return
}
Expand Down

0 comments on commit e6f5c53

Please sign in to comment.