by spacey on 2/6/16, 8:56 AM with 5 comments
by mmarx on 2/7/16, 2:22 PM
Wouldn't this be solved by allowing for optional arguments (which go doesn't seem to support)? Also, why not just _explicitly_ set the file mode, even if the file still exists (as otherwise it would fail anyways)?
by junke on 2/7/16, 3:40 PM
This is a false dichotomy: after all, "open" is explicit and abstract (w.r.t. actual file systems).
The original article from Metz was interesting, but the example here is disappointing. The code was apparently used only once: why generalize?
And if you want to generalize, why not make use of two functions: a new one which implements "touch", and the existing os.Chmod?