From 9c9b4a8f5f30ddaf3652f2817bff12eaae0b241b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Garcia?= Date: Sun, 4 Dec 2022 17:48:44 -0300 Subject: [PATCH] Updated Modifiers (markdown) --- Modifiers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modifiers.md b/Modifiers.md index c6c3db3..69fec44 100644 --- a/Modifiers.md +++ b/Modifiers.md @@ -26,7 +26,7 @@ Modifiers improve on the `Valuer`/`Scanner` feature provided by the standard lib - `json`: It will convert any type to JSON before writing to the database and unmarshal it back from JSON when reading, this makes it easy to save structs as JSON in the database if this fits your use-case. -- `timeNowUTC`: It only work on attributes of type `time.Time` and it sets this attribute to `time.Now().UTC()` every time before insertions and updates. This modifier was created to be used on `UpdatedAt` timestamp fields. +- `timeNowUTC`: It only works on attributes of type `time.Time` and it sets this attribute to `time.Now().UTC()` every time before insertions and updates. This modifier was created to be used on `UpdatedAt` timestamp fields. - `timeNowUTC/skipUpdates`: Does the same as the above but only on insertions, during Updates attributes marked with this modifier will be completely ignored. This is useful for `CreatedAt` fields where you only want them to be set once when first creating the record. - `skipUpdates`: Will ignore fields on updates. - `skipInserts`: Will ignore fields on inserts.