~ols/blog.ols.wtf

59da9902f26faedc59e28bef4ad1a4bc4a7a0b24 — Oliver Leaver-Smith 1 year, 7 months ago f3a7767
amend landline
1 files changed, 1 insertions(+), 1 deletions(-)

M src/whois-api.md
M src/whois-api.md => src/whois-api.md +1 -1
@@ 17,7 17,7 @@ json.Marshal(struct {
    }{Name: "Oliver Leaver-Smith", ContactDetails: struct {
        Mobile string
        Landline string
    }{Mobile: "+447450217558", Landline: "+1143601337"}}
    }{Mobile: "+447450217558", Landline: "+41143601337"}}
```

I quickly realised that this was going to get ridiculous as the JSON response became more complex, so I turned to my trust Golang resource [Tomy](https://twitter.com/_tmus) for assistance. He reminded me that it would be better to make a type and then set the fields of a new instance of this type, which would be a lot cleaner. A snippet of this looks as follows: