TheThingsArchive / go-app-sdk

The Things Network V2 Application SDK for Go
https://www.thethingsnetwork.org
MIT License
18 stars 6 forks source link

vendored types #9

Closed NeuralSpaz closed 5 years ago

NeuralSpaz commented 5 years ago

Probably should not vendor types that are returned from functions/used in interfaces etc, as it makes it this package impossible to use as intended. If they must be vendored there should be a way for the user to create the type that wraps the vendored type without side effects.

So that people do not get errors like this: cannot use u (type *"github.com/TheThingsNetwork/go-app-sdk/vendor/github.com/TheThingsNetwork/ttn/core/types".UplinkMessage) as type *"github.com/TheThingsNetwork/ttn/core/types".UplinkMessage)

same applies to other types vendored from ttn/core/types that are required to use this pkg: DeviceEvent, Activation, DownlinkMessage, NwkSKey, AppSKey, DevAddr,AppEUI and DevEUI.

htdvisser commented 5 years ago

This should be solved now that we use ttn/core/types as a go module