base

package
v0.0.0-...-db01e9f Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(cfgPath string, level string) (*slog.Logger, func(), error)

InitLogger initializes a new logger that writes to a file and returns it along with a closure function to close the opened log file. The log file path is determined by LogFilePath(cfgPath). The level parameter sets the minimum log level (debug, info, warn, error).

func LogFilePath

func LogFilePath(cfgPath string) (string, error)

func MustPrettyJSON

func MustPrettyJSON(v any) string

Types

type Spinner

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

func StartProgressSpinner

func StartProgressSpinner(taskName string, total int) *Spinner

func (*Spinner) Incr

func (s *Spinner) Incr()

func (*Spinner) Stop

func (s *Spinner) Stop()

Jump to

Keyboard shortcuts

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