Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

vrischmann/userdir

Repository files navigation

userdir

Build Status GoDoc

userdir is a small library which allows you to get user directories according to the operating system conventions.

Simple example:

d := userdir.GetDataHome()
fmt.Println(d)
// Outputs something like this
//   /home/vincent/.local/share        - on Linux
//   C:/Users/vincent/AppData/Roaming  - on Windows
//   /Users/vincent/Library            - on Mac OS X

Windows specificities

On Windows userdir will use the operating systems function SHGetKnownFolderPath.

Linux specificities

On Linux userdir will use the XDG Base Directory Specification.

Further support

Still needs support for other Unixes (might be as simple as using XDG there too) and Mac OS X.

License

userdir is under the MIT license.

About

Go package to get user directories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages