Skip to content
Snippets Groups Projects
Commit 4520c8be authored by Semyon Krestyaninov's avatar Semyon Krestyaninov :dog2:
Browse files

fix error message

parent db3e9872
No related branches found
No related tags found
No related merge requests found
...@@ -243,7 +243,7 @@ func ToMap(item *Item, sch *schema.Schema) (map[string]any, error) { ...@@ -243,7 +243,7 @@ func ToMap(item *Item, sch *schema.Schema) (map[string]any, error) {
// Вычисляемые поля игнорируются при декодировании. // Вычисляемые поля игнорируются при декодировании.
func FromMap(input map[string]any, sch *schema.Schema) (*Item, error) { func FromMap(input map[string]any, sch *schema.Schema) (*Item, error) {
if len(input) == 0 { if len(input) == 0 {
return nil, errors.New("input map must not be nil") return nil, errors.New("input map must not be empty or nil")
} }
if sch == nil { if sch == nil {
return nil, errors.New("schema must not be nil") return nil, errors.New("schema must not be nil")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment