util

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert added in v0.9.0

func Assert(b bool)

Assert panics if b is false. If compile with -tags release, Assert will be compiled out

func GetConfigDir

func GetConfigDir() (string, error)

GetConfigDir returns the path to the user config dir on the current machine as a string.

If the config dir does not exist, it is created.

If the default location for config directories does not exist, or if there is an error creating the config dir, an error is returned.

func NewWindowIfNotExists added in v0.14.0

func NewWindowIfNotExists(title string) fyne.Window

NewWindowIfNotExists creates a window with the given title, unless there is already an existing window with the same title If a window with title already exists, that window is returned instead of a new window

func ReadCount added in v0.15.0

func ReadCount(reader io.Reader, length int) ([]byte, error)

ReadCount reads at most length bytes from reader. If less than length bytes are read from reader, the bytes are returned along with an err

func ReportUiError added in v0.17.0

func ReportUiError(err error, w fyne.Window)

ReportUiError logs an error, and also displays a popup with the error to the user

func ReportUiErrorWithMessage added in v0.17.0

func ReportUiErrorWithMessage(message string, err error, w fyne.Window)

ReportUiErrorWithMessage is the same as ReportUiError, but logs a custom error message instead of the default

Types

This section is empty.

Jump to

Keyboard shortcuts

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