Help us shape the future of Go! Take the 2026 Go Developer Survey

platform

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 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