util

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyToStateDir added in v0.17.0

func CopyToStateDir(srcPath, dstName string) error

CopyToStateDir copies the file at srcPath to a file named dstName in the thcon state directory, overwriting it if it already exists.

func EnsureThconStateDir

func EnsureThconStateDir() (string, error)
func ReplaceStateSymlink(oldname, newname string) error

ReplaceSymlink creates newname in the thcon state directory as a symbolic link to oldname, and removes newname first if it already exists.

Types

type DurationHook

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

func RecordDuration

func RecordDuration() DurationHook

func (DurationHook) Run

func (dh DurationHook) Run(e *zerolog.Event, level zerolog.Level, message string)

Jump to

Keyboard shortcuts

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