mac

package
v3.0.0-beta.16 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package mac provides a set of functions to interact with the macOS platform.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInAppBundle = errors.New("mac: executable is not inside an application bundle")

ErrNotInAppBundle is returned when the current executable is not inside a macOS application bundle.

Functions

func GetBundleID

func GetBundleID() string

GetBundleID returns the bundle ID of the application.

func LoadResource

func LoadResource(name string) ([]byte, error)

LoadResource reads a resource from the current application's Contents/Resources directory.

Resource names use slash-separated paths relative to Contents/Resources. Use ResourceFS to open or stream larger resources instead of loading them entirely into memory.

func ResourceFS

func ResourceFS() (fs.FS, error)

ResourceFS returns a read-only file system rooted at the current application's Contents/Resources directory.

Use ResourceFS when resources should be opened or streamed on demand. For small resources that should be read entirely into memory, use LoadResource.

func ResourcePath

func ResourcePath() (string, error)

ResourcePath returns the path to the current application's Contents/Resources directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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