Skip to content

Commit

Permalink
Add horizontal dividers to README
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Mar 13, 2020
1 parent af09776 commit 7600a54
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -46,6 +46,8 @@ dirs, err := scope.DataDirs()
| macOS | ["~/Library/Application Support/app"] | ["/Library/Application Support/app"] |
| Windows | ["%LOCALAPPDATA%/app"] | ["%PROGRAMDATA%/app"] |

---

`ConfigDirs` retrieves a priority-sorted list of config directories:

```go
Expand All @@ -58,6 +60,8 @@ dirs, err := scope.ConfigDirs()
| macOS | ["~/Library/Preferences/app"] | ["/Library/Preferences/app"] |
| Windows | ["%LOCALAPPDATA%/app/Config"] | ["%PROGRAMDATA%/app/Config"] |

---

`CacheDir` retrieves the app's cache directory:

```go
Expand All @@ -70,6 +74,8 @@ dir, err := scope.CacheDir()
| macOS | ~/Library/Caches/app | /Library/Caches/app |
| Windows | %LOCALAPPDATA%/app/Cache | %PROGRAMDATA%/app/Cache |

---

`DataPath` retrieves the default path of a writeable file for user-specific data:

```go
Expand All @@ -82,6 +88,8 @@ path, err := scope.DataPath("filename")
| macOS | ~/Library/Application Support/app/filename | /Library/Application Support/app/filename |
| Windows | %LOCALAPPDATA%/app/filename | %PROGRAMDATA%/app/filename |

---

`ConfigPath` retrieves the default path of a writeable config file for
user-specific data:

Expand All @@ -95,6 +103,8 @@ path, err := scope.ConfigPath("filename.conf")
| macOS | ~/Library/Preferences/app/filename.conf | /Library/Preferences/app/filename.conf |
| Windows | %LOCALAPPDATA%/app/Config/filename.conf | %PROGRAMDATA%/app/Config/filename.conf |

---

`LogPath` retrieves the default path of a writeable log file:

```go
Expand All @@ -107,6 +117,8 @@ path, err := scope.LogPath("filename.log")
| macOS | ~/Library/Logs/app/filename.log | /Library/Logs/app/filename.log |
| Windows | %LOCALAPPDATA%/app/Logs/filename.log | %PROGRAMDATA%/app/Logs/filename.log |

---

`LookupData` retrieves a priority-sorted list of paths for existing data files
with the name `filename`:

Expand All @@ -120,6 +132,8 @@ path, err := scope.LookupData("filename")
| macOS | ["~/Library/Application Support/app/filename"] | ["/Library/Application Support/app/filename"] |
| Windows | ["%LOCALAPPDATA%/app/filename"] | ["%PROGRAMDATA%/app/filename"] |

---

`LookupConfig` retrieves a priority-sorted list of paths for existing config
files with the name `filename.conf`:

Expand Down

0 comments on commit 7600a54

Please sign in to comment.