dirset

package
v0.0.0-...-0253919 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

README

dirset

Package dirset provides discovery of common application directories for things like caching, locks, and logs.

import go.pitz.tech/lib/dirset

Usage

type DirectorySet
type DirectorySet struct {
	CacheDir      string
	StateDir      string
	LocalStateDir string
	LockDir       string
	LogDir        string
}

DirectorySet defines a common set of paths that applications can use for a variety of reasons.

func Local
func Local(appName string) (DirectorySet, error)

Local uses information about the local system to determine a common set of paths for use by the application.

func Must
func Must(appName string) DirectorySet

Must panics if Local fails to obtain the directory set.

Documentation

Overview

Package dirset provides discovery of common application directories for things like caching, locks, and logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectorySet

type DirectorySet struct {
	CacheDir      string
	StateDir      string
	LocalStateDir string
	LockDir       string
	LogDir        string
}

DirectorySet defines a common set of paths that applications can use for a variety of reasons.

func Local

func Local(appName string) (DirectorySet, error)

Local uses information about the local system to determine a common set of paths for use by the application.

func Must

func Must(appName string) DirectorySet

Must panics if Local fails to obtain the directory set.

Jump to

Keyboard shortcuts

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