From 6b0ed95018c4c8b77e9fa811a07a728a34d5c621 Mon Sep 17 00:00:00 2001 From: Mike Ivanou Date: Wed, 28 Dec 2016 17:46:39 +0300 Subject: [PATCH] fix readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3ff0e21..212fe64 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ Installation Usage and documentation ------ - `./genval packageWithStructsForGeneration` + ./genval packageWithStructsForGeneration or as go:generate directive - `//go:generate genval packageWithStructsForGeneration` + //go:generate genval packageWithStructsForGeneration ##### Additional flags outputFile - output file name (default: validators.go) @@ -29,9 +29,9 @@ or as go:generate directive - *Pointer*: **nullable**, **not_null** - it's clear - *Interface*: **func** - the same as for struct (`func NameOfTheFunc(i interface{})error{..}`) - *Struct*: **func** - name of the method of this struct (`func(s Struct) MethodName()error{..}`) - or name of the func that will be used for validation (`func NameOfTheFunc(s Struct)error{..}`) - *Can be used not once:* `func=.MethodName,func=utils.NameOfTheFunc` or even `func=.MethodName;utils.NameOfTheFunc` - *Methods should starts from '.'* + or name of the func that will be used for validation (`func nameOfTheFunc(s Struct)error{..}`) + *Methods should starts from '.'* + *Can be used not once:* `func=.MethodName,func=nameOfTheFunc` or even `func=.MethodName;nameOfTheFunc` - *Map*: **min_items**, **max_items** - min and max count of items in map **key**, **value** - scope tags, contains validation tags for key or value