checksutils

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

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

func CurrentUsername() (string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL