utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResetColor   = "\033[0m"
	DisplayColor = "\033[33m"
)

Variables

View Source
var ConcurrentMode bool

ConcurrentMode buffers output instead of printing inline. Set to true during concurrent scans so progress display is not interrupted.

View Source
var Quiet bool

Quiet suppresses informational output when true (set by -quiet flag).

Functions

func ColorizeItem

func ColorizeItem(input string) string

func ColorizeMessage

func ColorizeMessage(moduleName string, method string, severity string, result string) string

ColorizeMessage creates a colorized message string with the given components. Exported for use by formatters package.

func DetermineSeverity

func DetermineSeverity(err error) string

DetermineSeverity returns the severity based on the error received. Returns "hit" for nil errors (accessible services) and "info" for errors. Exported for use by formatters package.

func FlushOutput

func FlushOutput()

FlushOutput prints all buffered messages and resets concurrent mode.

func HandleAWSError

func HandleAWSError(debug bool, callName string, err error) error

func MaskSecret

func MaskSecret(secret string) string

func PrintAccessGranted

func PrintAccessGranted(debug bool, serviceName, resource string, additionalInfo ...interface{})

func PrintResult

func PrintResult(debug bool, moduleName string, method string, result string, err error)

func UnmarshalJSON

func UnmarshalJSON(data []byte, v interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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