env

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package env describes the environment the app runs in: operating system and version, CPU architecture, whether this is a debug build, and the WebView engine.

Info is safe from any goroutine. Pass the app only once it runs (as tango.Await, it would otherwise wait for Run, or panic on the main goroutine); it is needed only for the WebView fields, which stay empty when the backend does not report them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	OS        string // runtime.GOOS: "darwin", "windows", "linux", ...
	Arch      string // runtime.GOARCH
	OSName    string // "macOS", "Windows", "Ubuntu 24.04.1 LTS", ...
	OSVersion string // "15.3.1", "10.0.26100", kernel release on Linux
	// Debug is true in development builds (-tags tango_dev, as tan dev
	// builds) and false in production builds, the default.
	Debug bool
	// WebView names the page engine and its version when the backend
	// reports them: "WebKit" / "WebView2" / "WebKitGTK".
	WebView        string
	WebViewVersion string
}

Environment is a snapshot of the environment.

func Info

func Info(a *tango.App) Environment

Info returns the environment. a may be nil, which leaves the WebView fields empty; after the app quit they are empty too.

Jump to

Keyboard shortcuts

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