diff options
author | Caleb Bassi <calebjbassi@gmail.com> | 2019-02-16 02:11:05 -0800 |
---|---|---|
committer | Caleb Bassi <calebjbassi@gmail.com> | 2019-02-22 11:52:02 -0800 |
commit | 334f08bc5ae225c3f3b9ec01c143d135b83f3a5b (patch) | |
tree | c4a88d77b53bb1ea85406d53325b5c43efab9886 /vendor | |
parent | 357ff01fe3d387ae6d28dc3eab6b11a49ab58eae (diff) |
Revert back to using XDG on macOS
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/.gitignore | 24 | ||||
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/LICENSE | 21 | ||||
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/README.md | 52 | ||||
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/appdir.go | 17 | ||||
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/appdir_darwin.go | 22 | ||||
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/appdir_windows.go | 22 | ||||
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/appdir_xdg.go | 39 | ||||
-rw-r--r-- | vendor/github.com/ProtonMail/go-appdir/main.go | 32 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
9 files changed, 0 insertions, 231 deletions
diff --git a/vendor/github.com/ProtonMail/go-appdir/.gitignore b/vendor/github.com/ProtonMail/go-appdir/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/vendor/github.com/ProtonMail/go-appdir/LICENSE b/vendor/github.com/ProtonMail/go-appdir/LICENSE deleted file mode 100644 index 853b46d..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/ProtonMail/go-appdir/README.md b/vendor/github.com/ProtonMail/go-appdir/README.md deleted file mode 100644 index 1479d3c..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# go-appdir - -[![GoDoc](https://godoc.org/github.com/ProtonMail/go-appdir?status.svg)](https://godoc.org/github.com/ProtonMail/go-appdir) - -Minimalistic Go package to get application directories such as config and cache. - -Platform | Windows | [Linux/BSDs](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) | macOS --------- | ------- | ------------------------------------------------------------------------------------------ | ----- -User-specific config | `%APPDATA%` (`C:\Users\%USERNAME%\AppData\Roaming`) | `$XDG_CONFIG_HOME` (`$HOME/.config`) | `$HOME/Library/Application Support` -User-specific cache | `%LOCALAPPDATA%` (`C:\Users\%USERNAME%\AppData\Local`) | `$XDG_CACHE_HOME` (`$HOME/.cache`) | `$HOME/Library/Caches` -User-specific logs | `%LOCALAPPDATA%` (`C:\Users\%USERNAME%\AppData\Local`) | `$XDG_STATE_HOME` (`$HOME/.local/state`) | `$HOME/Library/Logs` - -Inspired by [`configdir`](https://github.com/shibukawa/configdir). - -## Usage - -```go -package main - -import ( - "os" - "path/filepath" - - "github.com/ProtonMail/go-appdir" -) - -func main() { - // Get directories for our app - dirs := appdir.New("my-awesome-app") - - // Get user-specific config dir - p := dirs.UserConfig() - - // Create our app config dir - if err := os.MkdirAll(p, 0755); err != nil { - panic(err) - } - - // Now we can use it - f, err := os.Create(filepath.Join(p, "config-file")) - if err != nil { - panic(err) - } - defer f.Close() - - f.Write([]byte("<3")) -} -``` - -## License - -MIT diff --git a/vendor/github.com/ProtonMail/go-appdir/appdir.go b/vendor/github.com/ProtonMail/go-appdir/appdir.go deleted file mode 100644 index f259e2c..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/appdir.go +++ /dev/null @@ -1,17 +0,0 @@ -// Get application directories such as config and cache. -package appdir - -// Dirs requests application directories paths. -type Dirs interface { - // Get the user-specific config directory. - UserConfig() string - // Get the user-specific cache directory. - UserCache() string - // Get the user-specific logs directory. - UserLogs() string -} - -// New creates a new App with the provided name. -func New(name string) Dirs { - return &dirs{name: name} -} diff --git a/vendor/github.com/ProtonMail/go-appdir/appdir_darwin.go b/vendor/github.com/ProtonMail/go-appdir/appdir_darwin.go deleted file mode 100644 index d2043ee..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/appdir_darwin.go +++ /dev/null @@ -1,22 +0,0 @@ -package appdir - -import ( - "os" - "path/filepath" -) - -type dirs struct { - name string -} - -func (d *dirs) UserConfig() string { - return filepath.Join(os.Getenv("HOME"), "Library", "Application Support", d.name) -} - -func (d *dirs) UserCache() string { - return filepath.Join(os.Getenv("HOME"), "Library", "Caches", d.name) -} - -func (d *dirs) UserLogs() string { - return filepath.Join(os.Getenv("HOME"), "Library", "Logs", d.name) -} diff --git a/vendor/github.com/ProtonMail/go-appdir/appdir_windows.go b/vendor/github.com/ProtonMail/go-appdir/appdir_windows.go deleted file mode 100644 index 8be907e..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/appdir_windows.go +++ /dev/null @@ -1,22 +0,0 @@ -package appdir - -import ( - "os" - "path/filepath" -) - -type dirs struct { - name string -} - -func (d *dirs) UserConfig() string { - return filepath.Join(os.Getenv("APPDATA"), d.name) -} - -func (d *dirs) UserCache() string { - return filepath.Join(os.Getenv("LOCALAPPDATA"), d.name) -} - -func (d *dirs) UserLogs() string { - return filepath.Join(os.Getenv("LOCALAPPDATA"), d.name) -} diff --git a/vendor/github.com/ProtonMail/go-appdir/appdir_xdg.go b/vendor/github.com/ProtonMail/go-appdir/appdir_xdg.go deleted file mode 100644 index 8bbc543..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/appdir_xdg.go +++ /dev/null @@ -1,39 +0,0 @@ -// +build !darwin,!windows - -package appdir - -import ( - "os" - "path/filepath" -) - -type dirs struct { - name string -} - -func (d *dirs) UserConfig() string { - baseDir := filepath.Join(os.Getenv("HOME"), ".config") - if os.Getenv("XDG_CONFIG_HOME") != "" { - baseDir = os.Getenv("XDG_CONFIG_HOME") - } - - return filepath.Join(baseDir, d.name) -} - -func (d *dirs) UserCache() string { - baseDir := filepath.Join(os.Getenv("HOME"), ".cache") - if os.Getenv("XDG_CACHE_HOME") != "" { - baseDir = os.Getenv("XDG_CACHE_HOME") - } - - return filepath.Join(baseDir, d.name) -} - -func (d *dirs) UserLogs() string { - baseDir := filepath.Join(os.Getenv("HOME"), ".local", "state") - if os.Getenv("XDG_STATE_HOME") != "" { - baseDir = os.Getenv("XDG_STATE_HOME") - } - - return filepath.Join(baseDir, d.name) -} diff --git a/vendor/github.com/ProtonMail/go-appdir/main.go b/vendor/github.com/ProtonMail/go-appdir/main.go deleted file mode 100644 index c9c0fe5..0000000 --- a/vendor/github.com/ProtonMail/go-appdir/main.go +++ /dev/null @@ -1,32 +0,0 @@ -// +build ignore - -package main - -import ( - "os" - "path/filepath" - - "github.com/ProtonMail/go-appdir" -) - -func main() { - // Get directories for our app - dirs := appdir.New("my-awesome-app") - - // Get user-specific config dir - p := dirs.UserConfig() - - // Create our app config dir - if err := os.MkdirAll(p, 0755); err != nil { - panic(err) - } - - // Now we can use it - f, err := os.Create(filepath.Join(p, "config-file")) - if err != nil { - panic(err) - } - defer f.Close() - - f.Write([]byte("<3")) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 3a9b78c..b848bcd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,5 +1,3 @@ -# github.com/ProtonMail/go-appdir v0.0.0-20180220133335-7c788d1b45c6 -github.com/ProtonMail/go-appdir # github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 github.com/StackExchange/wmi # github.com/cjbassi/battery v0.0.0-20190206091651-451cd0de3f6f |