code: func ErrorsByField(e error) map[string]string {
  	m := make(map[string]string)
  	if e == nil {
  		return m
  	}
  	// prototype for ValidateStruct
  
  	switch e.(type) {
  	case Error:
  		m[e.(Error).Name] = e.(Error).Err.Error()
  	case Errors:
  		for _, item := range e.(Errors).Errors() {
  			n := ErrorsByField(item)
  			for k, v := range n {
  				m[k] = v
  			}
  		}
  	}
  
  	return m
  }
docs: // ErrorsByField returns map of errors of the struct validated
  // by ValidateStruct or empty map if there are no errors.