Documentation ¶
Index ¶
- Constants
- Variables
- func ChangeTimeFormat(timeString string, format string) string
- func DebugLog(args ...any)
- func Keys[M ~map[K]V, K comparable, V any](m M) []K
- func ShiftSlice[K comparable](newData K, slice []K) []K
- func SknLoadImageFromURI(u fyne.URI, themed bool) fyne.CanvasObject
- func SknSelectImage(alias string) *canvas.Image
- func SknSelectResource(alias string) fyne.Resource
- func SknSelectThemedImage(alias string) *canvas.Image
- func SknSelectThemedInvertedImage(alias string) *canvas.Image
- func SknSelectThemedResource(alias string) fyne.Resource
Constants ¶
View Source
const ( AppIcon = "apcupsd" PreferencesIcon = "preferences" HostStatusUnknown = "unknown" HostStatusOnBattery = "onbattery" HostStatusCharging = "charging" HostStatusOnline = "online" )
Variables ¶
View Source
var DebugLoggingEnabled = ("true" == os.Getenv("GAPC_DEBUG")) // "true" / "false"
View Source
var ShutdownSignals chan os.Signal
ShutdownSignals alternate panic() implementation, causes an orderly shutdown
Functions ¶
func ChangeTimeFormat ¶
ChangeTimeFormat converts APC timestamp to something more human readable time.RFC1123, time.RFC3339 are good choices returns local time version of value
func Keys ¶
func Keys[M ~map[K]V, K comparable, V any](m M) []K
Keys returns the keys of the map m. The keys will be an indeterminate order. alternate reflect based: reflect.ValueOf(m).MapKeys()
func ShiftSlice ¶ added in v0.9.3
func ShiftSlice[K comparable](newData K, slice []K) []K
ShiftSlice drops index 0 and append newData to any type of slice
func SknLoadImageFromURI ¶
func SknLoadImageFromURI(u fyne.URI, themed bool) fyne.CanvasObject
SknLoadImageFromURI loads an image or svg from filesystem
func SknSelectImage ¶
func SknSelectResource ¶
func SknSelectResource(alias string) fyne.Resource
func SknSelectThemedImage ¶
func SknSelectThemedResource ¶
func SknSelectThemedResource(alias string) fyne.Resource
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.