From 6d92063b996e0d5e849d78a38927a9c5b85e8e75 Mon Sep 17 00:00:00 2001 From: Javier Provecho Fernandez Date: Thu, 1 Jan 2015 16:22:02 +0100 Subject: [PATCH] Fix unexported field detection --- binding/binding.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding/binding.go b/binding/binding.go index 72b23df..20d6bdc 100644 --- a/binding/binding.go +++ b/binding/binding.go @@ -170,7 +170,7 @@ func Validate(obj interface{}) error { field := typ.Field(i) // Allow ignored and unexported fields in the struct - if field.Tag.Get("form") == "-" || field.PkgPath != "" { + if len(field.PkgPath) > 0 || field.Tag.Get("form") == "-" { continue }