--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
[...]
It seems like forcing project to put an assertion "Where I am".As our consensus, a good project is surely with "high cohesion", but never care "Where I am".
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
Here are two examples of "hello world" main packages: <ProjectRoot>/withoutlocal <ProjectRoot>/withlocal <- github.com/vipally/localpackage/local "withoutlocal" works well anywhere <ProjectRoot> is, even out of GoPath. "withlocal" works only when "<ProjectRoot> = <GoPath>/github.com/vipally/localpackage" How does go team think about this difference? It makes "withlocal" packages non-independent due to reference "LOCAL" packages as "GLOBAL" style. If I want my package works well anywhere, I have to write all code into one "LARGE-package". Just like: all.Printf/all.OpenFile/all.GOROOT Does this go team recommended? We must explicit followed priorty of go package find process: <ProjectRoot>: with highest-priorty path to find local packages. <Vendor> : with second-priorty path to find explicit-version of local-referenced third-party packages. <GoRoot> : with third-priorty path to find standard packages. <GoPath> : with lowest-priorty path to find third-party packages. Think about that not every go-project is wrote for open-souce(aim to share with others). Thousands of private go-projects(eg:gameservers) focus their own particular logic-flow only and never shared private-packages. We just called these projects "independent-projects". Because they have hundreds-of private-packages but no one is wrote for share. That is to say, they never care "where I am", but "what I need". Unfortunately, these kind of projects are always "huge". Maybe millions-of lines or thousands-of private-packages reference inside? In this case, change project name or source control server become heavy work, because the working path changes and thousands-of private-packages reference code have to be update. But if local-packages are referenced by "#/modules/module1" style, everything is change the name of project root only then. How do you think about the difference between such styles of referencing local-packages then? "#/modules/module1" "<GoRoot>/server/user/project/modules/module1"
Details: https://github.com/vipally/localpackage#examples-of-withwithout-local-package-reference
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
Hi,Here are two examples of "hello world" main packages: <ProjectRoot>/withoutlocal <ProjectRoot>/withlocal <- github.com/vipally/localpackage/local "withoutlocal" works well anywhere <ProjectRoot> is, even out of GoPath. "withlocal" works only when "<ProjectRoot> = <GoPath>/github.com/vipally/localpackage" How does go team think about this difference?
It makes "withlocal" packages non-independent due to reference "LOCAL" packages as "GLOBAL" style. If I want my package works well anywhere, I have to write all code into one "LARGE-package". Just like: all.Printf/all.OpenFile/all.GOROOT Does this go team recommended? We must explicit followed priorty of go package find process: <ProjectRoot>: with highest-priorty path to find local packages. <Vendor> : with second-priorty path to find explicit-version of local-referenced third-party packages. <GoRoot> : with third-priorty path to find standard packages. <GoPath> : with lowest-priorty path to find third-party packages. Think about that not every go-project is wrote for open-souce(aim to share with others). Thousands of private go-projects(eg:gameservers) focus their own particular logic-flow only and never shared private-packages. We just called these projects "independent-projects". Because they have hundreds-of private-packages but no one is wrote for share. That is to say, they never care "where I am", but "what I need". Unfortunately, these kind of projects are always "huge". Maybe millions-of lines or thousands-of private-packages reference inside? In this case, change project name or source control server become heavy work, because the working path changes and thousands-of private-packages reference code have to be update.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
4. "#/xxx" style reference seems a best solution like "vendor" to fix local-package reference problem.
Without any hard code "where I am" exists in any go files.
And it will works well together with current global-style, because "#" will be replaced with <ProjectRoot> by compiler automatically.