From 9e4314f9ab09b9e2a848c7418109429d536f647c Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Wed, 2 Sep 2015 20:46:03 -0400 Subject: [PATCH] add more docs to doc.go --- doc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc.go b/doc.go index 843b00d..fd8ab91 100644 --- a/doc.go +++ b/doc.go @@ -18,6 +18,9 @@ I needed to know the field and what validation failed so that I could provide an Validation functions return type error +Doing things this way is actually the way the standard library does, see the file.Open +method here: https://golang.org/pkg/os/#Open. + They return type error to avoid the issue discussed in the following, where err is always != nil: http://stackoverflow.com/a/29138676/3158232 https://github.com/bluesuncorp/validator/issues/134