socket

package
v0.1.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(socketPath string) error

Cleanup removes the socket file if it exists.

func DefaultPath

func DefaultPath() string

DefaultPath returns the default Unix socket path for the current user. It follows the XDG Base Directory Specification with platform-appropriate fallbacks:

  1. $XDG_RUNTIME_DIR/guppi/guppi.sock (Linux standard)
  2. $TMPDIR/guppi-$UID/guppi.sock (macOS / fallback)
  3. /tmp/guppi-$UID/guppi.sock (last resort)

func EnsureDir

func EnsureDir(socketPath string) error

EnsureDir creates the parent directory for the socket path with 0700 permissions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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