utils

package
v0.0.0-...-5598a53 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key []byte, encrypted string) (string, error)

func Encrypt

func Encrypt(key []byte, plaintext string) (string, error)

Types

type Stopwatch

type Stopwatch struct {
	// contains filtered or unexported fields
}

func NewStopwatch

func NewStopwatch() *Stopwatch

NewStopwatch creates a new stopwatch

func (*Stopwatch) Finalize

func (sw *Stopwatch) Finalize()

Finalize calculates percentages

func (*Stopwatch) PrintTable

func (sw *Stopwatch) PrintTable()

PrintTable outputs the collected timings as a formatted table

func (*Stopwatch) Start

func (sw *Stopwatch) Start(label string)

Start begins timing for a label

func (*Stopwatch) Stop

func (sw *Stopwatch) Stop(label string)

Stop ends timing for a label and stores the elapsed time

type Timing

type Timing struct {
	Label   string
	Elapsed time.Duration
	Percent float64
}

Jump to

Keyboard shortcuts

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