Azure / Azure/azure-dev

Hoist WriteFileAtomic to pkg/osutil

Open
#7,911 0 comments 0 reactions 0 assignees View on GitHub
area/code-improvements enhancement
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Context
`WriteFileAtomic` (write-to-temp + rename) currently lives in the environment package. It's a general-purpose utility that would be useful in other packages (e.g., config.json writes).

## Proposal
Move `WriteFileAtomic` to `pkg/osutil` so it can be shared across the codebase. Update existing callers.

## References
- PR #7776 follow-up from concurrency review

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.