script
script copied to clipboard
Add Temporary Files support.
Add some equivalent to the Linux command: mktemp
Add some equivalent to the Linux command: mktemp
Hi @anderson-lt, I'm wondering why you cannot use Go's os.CreateTemp
or Exec with mktemp?
One of the facilities offered by this library is to write common shell programs in Go, and avoid endlessly repeating the syntax of if err != nil { ... }
and although the Exec
function allows you to use this command in a clean way, I consider in my opinion that the command should already be in the library since this command is found in practically all UNIX shells.
Is this still a prospective feature? I was thinking of picking this up.
@suyash-sneo the question is exactly what the feature would be, isn't it? There's no point writing a script.MkdirTemp
function that simply calls the standard library—that would add code without adding value.