Documentation ¶
Overview ¶
Package checksutils provides utility functions for security/privacy checks. These functions are used in the context of performing security/privacy checks on a system.
Exported function(s): CurrentUsername
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentUsername ¶
CurrentUsername retrieves the username of the currently logged-in user in a Windows environment.
This function uses the os/user package to access the current user's information. It then parses the Username field to extract the actual username, discarding the domain if present.
Returns:
- string: The username of the currently logged-in user. If the username cannot be retrieved, an empty string is returned.
- error: An error object that wraps any error that occurs during the retrieval of the username. If the username is retrieved successfully, it returns nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.