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

osperm

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package osperm holds test helpers for tests that depend on operating-system permission enforcement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SkipIfRoot

func SkipIfRoot(t *testing.T)

SkipIfRoot skips the test when it runs as root. Tests that force a write failure by removing write permission (chmod) cannot fail that write as root, because root bypasses file and directory permissions. On Windows os.Geteuid returns -1, so the test always runs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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