Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⭐️ go package to create tmp.File() #4453

Merged
merged 1 commit into from
Jul 30, 2024
Merged

⭐️ go package to create tmp.File() #4453

merged 1 commit into from
Jul 30, 2024

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jul 30, 2024

This go package should be used across cnquery to generate temporary files and directories.

tmp.File() creates a new temporary file.

By default File() uses the default directory to create a new temporary file, to change the temporary directory use the environment variable MONDOO_TMP_DIR

Copy link
Contributor

github-actions bot commented Jul 30, 2024

Test Results

3 080 tests  ±0   3 079 ✅ ±0   1m 23s ⏱️ -2s
  364 suites +1       1 💤 ±0 
   27 files   ±0       0 ❌ ±0 

Results for commit aedaae3. ± Comparison against base commit 2897855.

♻️ This comment has been updated with latest results.

This go package should be used across `cnquery` to generate temporary files
and directories.

`tmp.File()` creates a new temporary file.

By default `File()` uses the default directory to create a new temporary file,
to change the temporary directory use the environment variable `MONDOO_TMP_DIR`

Signed-off-by: Salim Afiune Maya <[email protected]>
"Set the query packs to execute. This requires `querypack-bundle`. You can specify multiple UIDs")
_ = scanCmd.Flags().StringSliceP("querypack-bundle",
"f",
nil, "Path to local query pack file")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was my linter, I can revert if it is annoying 😅

Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement @afiune

@afiune afiune merged commit c2d0e9f into main Jul 30, 2024
15 checks passed
@afiune afiune deleted the afiune/tmp-dir branch July 30, 2024 22:24
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants