Assuming you're working on a project github.com/your-username/your-project
:
cd your-project
go mod init github.com/your-username/your-project
go get github.com/TheThingsNetwork/go-app-sdk
See the examples on GoDoc.
Source code for The Things Network is released under the MIT License, which can be found in the LICENSE file. A list of authors can be found in the AUTHORS file.