I suggest refactoring the deepgram package source files into a single folder, either at the root (which is common for library repos) or into a source folder (e.g. ./deepgram) which is also common for Go packages, to collect source code for a package into a folder named for that package.
At this point I would suggest moving ./types/prerecorded.go into the root which still requires importing with an alias:
A third option might be to organize the code into multiple packages named for related concerns, if you have multiple related concerns, like transcriptions, invitations, etc, but with only a few files a single package is probably sufficient.
Proposed changes
I propose reorganizing
deepgram
package source files into a single folder.Context
It is unusual to the point of non-idiomatic to have Go source files from different folders.
In the current HEAD commit we have the
deepgram
package used in two different folders:./deepgram.go
; andtypes
folder:./types/prerecorded.go
Possible Implementation
I suggest refactoring the
deepgram
package source files into a single folder, either at the root (which is common for library repos) or into a source folder (e.g../deepgram
) which is also common for Go packages, to collect source code for a package into a folder named for that package.At this point I would suggest moving
./types/prerecorded.go
into the root which still requires importing with an alias:The other approach, to move all the
deepgram
package files into a new folder./deepgram
would allow importing like this:A third option might be to organize the code into multiple packages named for related concerns, if you have multiple related concerns, like
transcriptions
,invitations
, etc, but with only a few files a single package is probably sufficient.