Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use os.PathListSeparator for list of folders in cmd-line args #2

Closed
wayoda opened this issue Sep 15, 2015 · 2 comments
Closed

Use os.PathListSeparator for list of folders in cmd-line args #2

wayoda opened this issue Sep 15, 2015 · 2 comments
Assignees

Comments

@wayoda
Copy link

wayoda commented Sep 15, 2015

Being able to specify arbitrary folders for libraries is a nice feature, but please don't use the comma to separate the items in a list of folders.

Use the platform independent os.PathListSeparator (: on unix, ; on windows).

Why?

  • every commadline tool I know of does it that way. Users expect to seperate different paths by their local path separator character
  • Go has a function to split a list of folders based on the os.PathListSeparator constant

Eberhard

@ffissore
Copy link
Contributor

Comma is the default way for the flag package. However, flag also supports multiple args of the same type. So, writing -hardware folder1,folder2 is the same thing as -hardware folder1 -hardware folder2

This is the preferred way of providing params as it allows to use terminal autocompletion when available

@ffissore ffissore self-assigned this Sep 15, 2015
@ffissore
Copy link
Contributor

Uhm I was wrong about the "default way". I'll fix it. Still, don't use that syntax. Specify multiple -hardware params (or -tools, or -libraries or -prefs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants