On 1/16/20 4:50 PM, Nick Rosbrook wrote: >> Looks good! Only one question: >> >>> + if not is_castable: >>> + s += 'if err := x.{}.toC(&xc.{}); err != nil >>> {{\n'.format(goname,cname) >> >> Err should be defined function-wide at this point. Are you using `:=` >> on purpose for some reason? Would it make sense to make this `=` instead? > > This is on purpose. IMO it's better to keep the variable scoped to the > if block when using short statement if syntax. If the desire is to > assign to the same `err` variable, then I would not use the short > statement. Reason being I think it helps readability; the short > statement syntax is handy, but it is easy to glance over and not > realize an assignment is being made.
Fair enough. I'll check this series in once I get a chance to test it again. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel