-
Notifications
You must be signed in to change notification settings - Fork 130
Move Go SDK files into datastar directory to remove the need to alias the Go sdk import #870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
…ith the package name to avoid needing to use the datastar alias when importing. Implements starfederation#870
Not a bad idea. If the path is going to change, then my PR here will not be needed: #869 (comment) I submitted the PR with intent of keeping the path as it is. @delaneyj, if the module path will be changed at all, right now is probably the best time to do it. |
Just to clarify, will this break everyone’s apps immediately, or only when the next release is tagged? |
With how Go modules work, other people won't bring in this breaking change until you release/tag. |
If you move the package, it will not break any existing builds. They will simply be stuck at the last version of the old path. To update, they will need to |
Perfect, thanks! |
* move datastar package files from sdk/go to sdk/go/datastar to align with the package name to avoid needing to use the datastar alias when importing. Implements #870 * remove extra newline * update go get in README to reflect the new package import path * update key/location for goConsts to point to the new location for consts.go
Merged #871. |
Continuation: #874 |
Feature Request
Today when importing the Go SDK you need to alias the import as
datastar "github.com/starfederation/datastar/sdk/go"
I propose moving the datastar package files into one more nested directory called
datastar
to remove the need to use an alias ofdatastar
. This would change imports fromdatastar "github.com/starfederation/datastar/sdk/go"
to"github.com/starfederation/datastar/sdk/go/datastar"
All of the examples use the datastar alias because I assume developers would prefer to use datastar as
datastar.NewSSE(...)
vsgo.NewSSE(...)
.To account for versioning you could alternatively use a v1 directory up front (e.g. -
"github.com/starfederation/datastar/sdk/go/datastar/v1"
) while still not needing to alias the import to use the package asdatastar.NewSSE(...)
.Datastar Version
v1.0.0-beta.11
The text was updated successfully, but these errors were encountered: