diff --git a/README.md b/README.md index bb9df89..8ea02bc 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,20 @@ This project is an attempt to address lack of required fields in Go's struct typ a construction that will actually enforce specifying mandatory fields by a compiler with the approach similar to **named arguments**. -As you are aware, when you create a structure in Go - you cannot specify required fields. For example, -if we have a structure for Person such as +Here is how it is going to look like in IDE, you will see only the next mandatory field +that you have to set: + +![Autocomplete](autocomplete.png) + +Here is an example when IDE (and Go compiler) shows you that you have missing mandatory +field (between `ExpiresIn` and `Build()`), and you will not be able to compile code until +you have this error fixed): + +![Missing Field error](error_sample.png) + +Looks great, right? Let's see how to achieve this. As you are aware, when you create a +structure in Go - you cannot specify required fields. For example, if we have a structure +for Person such as: ``` type Person struct { diff --git a/autocomplete.png b/autocomplete.png new file mode 100644 index 0000000..52cf9d3 Binary files /dev/null and b/autocomplete.png differ diff --git a/error_sample.png b/error_sample.png new file mode 100644 index 0000000..5d428e7 Binary files /dev/null and b/error_sample.png differ