ui/app: add a DataDir fallback to Go 1.12

o.UserConfigDir is introduced in Go 1.13, which is not released yet.
Add a Go 1.12 stopgab until then.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-13 13:27:02 +02:00
parent 4cde5d57d7
commit 112368a2e3
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Unlicense OR MIT
// +build !android
// +build !android,go1.13
package app
+12
View File
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: Unlicense OR MIT
// +build !android,!go1.13
package app
import "os"
func dataDir() (string, error) {
// Use a quick workaround until we can require go 1.13.
return os.UserHomeDir()
}