mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
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:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: Unlicense OR MIT
|
// SPDX-License-Identifier: Unlicense OR MIT
|
||||||
|
|
||||||
// +build !android
|
// +build !android,go1.13
|
||||||
|
|
||||||
package app
|
package app
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user