Closed porjo closed 7 years ago
Sound sensible. Would it be acceptable to have package globals to set things like separator or other default options?
We'd need to keep the current behaviour and make this optional of course.
This would be one way to achieve it which keeps the current behaviour by default and doesn't break the API
I had a think about this last year, and the reason I haven't done it is that it would make the interface not thread safe in a non-obvious way. You might be tempted to set the globals each time before calling the function, which would not be safe in a goroutine (i.e. in a server). The Separator might be safe as a global if it's clearly documented I guess, because you're likely only to set it once.
Re lowercase, I think better would be to add functions which preserve case, but I'm not sure on naming. I prefer to avoid mixed case in file names because of varying treatment on file systems like Mac OS or linux which can cause subtle bugs.
So on balance I'm going to close this one for the above reasons. Sorry it took so long and thanks for the suggestions.
A couple of defaults I'd like to be able to override:
-
separator: I'd like to use_