script icon indicating copy to clipboard operation
script copied to clipboard

Add Temporary Files support.

Open ALizarazoTellez opened this issue 2 years ago • 4 comments

Add some equivalent to the Linux command: mktemp

ALizarazoTellez avatar Oct 21 '22 03:10 ALizarazoTellez

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?

thiagonache avatar Nov 14 '22 10:11 thiagonache

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.

ALizarazoTellez avatar Dec 27 '22 03:12 ALizarazoTellez

Is this still a prospective feature? I was thinking of picking this up.

suyash-sneo avatar Jun 13 '24 17:06 suyash-sneo

@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.

bitfield avatar Jun 14 '24 08:06 bitfield