` ` `
- a
-- -- -- -- --
b-- -- -- -- -- -- -- bb. Go
-- -- -- -- --
c-- -- -- -- -- -- - cc. Go
- aa. Go
` ` `
A path with a aa. Go file, at the same time a path with b, c two subpaths, they were found in bb. Go and cc. Go file
Like this package path whether to allow? If allowed, aa. Go in how to use the package b and c, the contents of the package?
Thank you very much for answer friend,
CodePudding user response:
1. People think casual, it is recommended to use more the case go to control the2. Can it as it is, through the full path or a relative path to access, such as a/a/b/bb or./b/bb - if bb. Go package is bb,
CodePudding user response:
Member attribute to best like c # compiler to support or optimization, otherwise my to define the get set method and so on are all junk code, the development and execution efficiency is low, golang function call means that the parameters and return values of a copy,CodePudding user response:
Thank you very much!CodePudding user response:
Thank you very much! Excuse me if you have any value is whether the pointer passed a copy of the problem, go have a framework like spring?CodePudding user response:
The pointer itself is also variable, parameter is a copy of the pointer itself, understand the speakers of other languages in shallow copyCodePudding user response:
Basic can understand as the pointer passed as shallow copy, but the difference and C pointer passed to a certain extent,See also:
Reference