Documentation
¶
Overview ¶
Package privfile writes files only their owner can read: the token file (internal/auth) and the cache (internal/cache), which holds portfolio data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
Write replaces the file at path with data, in one step: data goes to a temporary file next to it, which is then renamed over it. A crash leaves the old file or the new one, never half of either, and a reader never sees a file being written. os.CreateTemp makes the file 0600 from the start, so it is never readable by others, not even for a moment. A missing directory is made 0700.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.