The bundle
part of most .go information is redundant. This may very well be inferred by reusing the listing title. Or matching the primary entry of a sibling. Go functions written in cmd//predominant.go can routinely infer the principle bundle.
It’s unusual that fashionable Go linters advocate making use of a docstring for the bundle, however solely in an arbitrary one .go supply file, amongst those who contribute to that very same bundle. Copying, pasting, and sustaining duplicate docstrings shouldn’t be… maintainable.
The bundle declaration is impartial of file-system necessities. So your bundle title can embody particular characters (e.g. unicode-symbols) which your file-system might not permit in a listing title. Your directory-names might use a special encoding (ANSI…?,) than your source-files. Your bundle title is case-sensitive whereas your file-system might ignore casing in folder names.
Your file-System may allow symbols in listing names, which aren’t legitimate for bundle names (e.g. areas ” ” or hyphens “-”)
The bundle declaration supplies the only canonical title on your bundle within the encoding of your source-files. Your listing title ought to by conference by the closest approximation to this title your file-system (or higher, the file-systems of all concerned maintainers) can assist.
1 Like
One answer is to limit listing and file path names accordingly.
As an apart, it’s value publishing a linter to warn on numerous spurious file path characters, as they have an inclination to interrupt a terrific many issues.