userlogdir

package
v0.48.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package userlogdir has a single function, UserLogDir, that returns an OS-specific path for storing user logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserLogDir

func UserLogDir() (string, error)

UserLogDir returns the default root directory to use for user-specific log data. Users should create their own application-specific subdirectory within this one and use that.

On Unix systems, it returns $XDG_CACHE_HOME as specified by https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.cache. On Darwin, it returns $HOME/Library/Logs. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib/cache.

If the location cannot be determined (for example, $HOME is not defined), then it will return an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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