You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're discussing the best way to organize imports in Gno projects. There are three main approaches under consideration:
Separate by purpose (e.g., p/, r/)
This organizes imports based on module type.
Separate by network
This keeps all imports together but categorizes them by the network they interact with.
No separation
We'd like to gather feedback and opinions to determine our preferred standard for import organization. Please share your thoughts or any other suggestions.
I usually organize imports by combining styles 1 and 2. For example, if I import 'p' and 'r' from both gno demo packages and custom packages, I apply the following style:
import (
"std"// normal packages, as is go's convention"strings""gno.land/p/demo/ufmt"// gno demo packages. 'p' takes precedence over 'r'. Sorted alphabetically"gno.land/r/demo/users""gno.land/p/foo/bar"// custom packages are separated from demo. Same sorting order as above"gno.land/r/xyz/baz"
)
We're discussing the best way to organize imports in Gno projects. There are three main approaches under consideration:
Separate by purpose (e.g.,
p/
,r/
)This organizes imports based on module type.
Separate by network
This keeps all imports together but categorizes them by the network they interact with.
No separation
We'd like to gather feedback and opinions to determine our preferred standard for import organization. Please share your thoughts or any other suggestions.
Related: #2510 (comment)
The text was updated successfully, but these errors were encountered: