Documentation
¶
Overview ¶
Package oswrapper is a wrapper around the standard os package that allows more secure interactions with the operating system. It should be used as a replacement in production code of the standard os package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetenvBool ¶
GetenvBool returns if an environmental variable is set to true. If it is not set, it is considered false. If it is set to a value that cannot be parsed as a boolean, an error is returned.
func IsRunningOnWindows ¶
func IsRunningOnWindows() bool
IsRunningOnWindows returns true if the code is running on Windows.
func ReadFileSafe ¶
ReadFileSafe checks if a file is safe to read, and then reads it. On Unix platforms, it can optionally if the file has strict permissions.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.