PostHog / posthog-go

Official PostHog Go library
MIT License
20 stars 17 forks source link

fix: fixes a nil panic when unable to fetch feature flags #20

Closed TristanSpeakEasy closed 1 year ago

TristanSpeakEasy commented 1 year ago

fixes a nil panic when unable to fetch feature flags and err != nil which means res.Body will be nil at defer time because we aren't returning early enough from the method

TristanSpeakEasy commented 1 year ago

apologies for the slight reformatting gofmt had its way with the file let me know if you want me to revert those changes

neilkakkar commented 1 year ago

makes sense, thanks!