#144HoursOfCode D13

Submitted almost 3 years ago

(1:10pm - 2pm, 7:45pm - 8:20pm)
** Note: I'm posting this on 6/14/18, but it is the updates for 6/13/18 **

* Continued working through the troubles I was facing with interpolating latitude and longitude values into weather URL, but didnt figure it out yet

I tried lots of things and got lots of different error messages on the 13th, and all of them helped me learn more about golang BUT I didn't get latitude and longitude successfully interpolated into the weather URL. Part of my issue was that I wanted to do a type conversion from the interface type that the latitude and longitude values need to be in order to use the gabs gem to pull them out of the Google Geocoding API JSON response. The interface that I converted them to didn't have any methods defined on it, so I tried fixing that by creating a new interface with latitude and longitude methods. But then when attempting to create new values of that interface type and substitute them into the URL, I got an error message that my new interface type Latlong was an invalid type for the composite literal requirement during the process of interpolation. I started on researching composite literals, but didn't finish yet. I also need to find out exactly which portion of that interpolation process is requiring a composite literal, because it has a few steps. Here are some resources I referenced when working on this:
* https://stackoverflow.com/questions/30162256/convert-nil-interface-to-pointer-of-something-in-golang
* https://stackoverflow.com/questions/32277884/golang-type-interface-is-interface-with-no-methods
* https://gobyexample.com/interfaces
* https://tour.golang.org/methods/15
* https://medium.com/golangspec/composite-literals-in-go-10dc62eec06a

It's been frustrating feeling so lost, but I know this is just a stumbling block and that I'm learning all the time so I'm just going to keep pushing through and drilling this info into my head.

Liz Lemon, played by Tina Fey, makes a determined facial gesture while mouthing the words "Let's Do This"

No commits for the 13th.


Add a comment: