CaliDog / certstream-go

Go library for connecting to CertStream
MIT License
140 stars 33 forks source link

Interface needs type assertion #1

Closed TheHackerDev closed 6 years ago

TheHackerDev commented 6 years ago

I get the following error at https://github.com/CaliDog/certstream-go/blob/master/certstream.go#L33:

cannot use v (type interface {}) as type string in argument to log.Info: need type assertion

It looks like you'll have to define the interface a little more, or add a String() method to be able to output to log.Info().

Cheers, Aaron (insp3ctre)

Fitblip commented 6 years ago

Hey @insp3ctre,

I think that I should actually just remove this. I believe I had it in for debug reasons, but it doesn't do anyone any good to just barf raw json into the logger anyway!

Thanks for the heads up, I'll fix it shortly :D

Fitblip commented 6 years ago

This should be fixed with https://github.com/CaliDog/certstream-go/commit/fa8151c06b3a4db38fe431a9cfa57d951f13df41

Let me know if you have any other issues or anything else you'd change about the lib! Thanks again for the reports :)

Have a great rest of your week!

TheHackerDev commented 6 years ago

That works, I agree. Thanks @Fitblip.

Cheers, Aaron (insp3ctre)