cmd/compile complains if an import path contains a space character. More so, it also complains if a package path (import path after resolving it) contains a space character. This seems overly zealous.
For instance, for a small experiment, I had put two .go files main.go and lib.go in a local directory that happens to be under my Google Drive directory, with the main package containing the local import "./lib". Because this resolves to an absolute path containing "Google Drive" as a component, the import gets rejected.
It's probably useful to reject arbitrary Unicode spaces, but a regular blank ' ' (0x20) character should be ok. Independent of Google Drive, on OS X it is not uncommon to have blanks in folder names.
cmd/compilecomplains if an import path contains a space character. More so, it also complains if a package path (import path after resolving it) contains a space character. This seems overly zealous.For instance, for a small experiment, I had put two .go files
main.goandlib.goin a local directory that happens to be under myGoogle Drivedirectory, with themainpackage containing the local import"./lib". Because this resolves to an absolute path containing"Google Drive"as a component, the import gets rejected.It's probably useful to reject arbitrary Unicode spaces, but a regular blank
' '(0x20) character should be ok. Independent of Google Drive, on OS X it is not uncommon to have blanks in folder names.