platform

package
v1.37.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package platform is where per-OS differences meet shared code. Shared files may read runtime.GOOS only as data; a branch on it belongs in a _linux.go, _darwin.go or _windows.go file. seams_test.go enforces that rule.

Index

Constants

This section is empty.

Variables

View Source
var Current = Caps{
	Opener: "xdg-open",
}

Functions

This section is empty.

Types

type Caps

type Caps struct {
	// Opener hands a URL, file or folder to the desktop's default app; empty
	// where there is none.
	Opener string
	// UsesMachineVM: containers run inside a VM, so host unix sockets and file
	// events don't reach them and gvproxy forwards their ports.
	UsesMachineVM bool
	// NativePHPRuntime: PHP can run on the host instead of in a container.
	NativePHPRuntime bool
	// WorkerModes: workers can run through exec or in a container of their own.
	WorkerModes bool
}

Caps are the facts about the host OS that shared code branches on. Each OS sets its own in a caps_<os>.go file as Current.

Jump to

Keyboard shortcuts

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