Permalink
Browse files

Get the reflection to recognize array parameters.

  • Loading branch information...
1 parent 0fce07e commit 8ec9d800f55a6e42f106e0965a47ac0e17cd04da @robfig robfig committed Sep 24, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 harness/reflect.go
View
@@ -386,6 +386,8 @@ func ExprName(expr ast.Expr) string {
return ExprName(t.X) + "." + ExprName(t.Sel)
case *ast.StarExpr:
return "*" + ExprName(t.X)
+ case *ast.ArrayType:
+ return "[]" + ExprName(t.Elt)
default:
ast.Print(nil, expr)
panic("Failed to generate name for field.")

0 comments on commit 8ec9d80

Please sign in to comment.