在项目结构中生成临时文件夹

I’ve a Go program which user should get it via go get command. my program is command line program, Now my program should generate temp folder to do some manipulation on data and when it finish generate zip with the artificats on the same folder that the user is running the cmd program, my question is where its better to generate the temp folder?

go
-src
—-userapp

if the user open terminal in the the user app and run some command I need to create (at the end some zip with artefacts)

Use the standard temporary directory of the operating system for manipulation. You can get it by calling function os.TempDir(). Put the final results in the current directory, you can get it by calling os.Getwd().