github.com/gop9/olt@v0.0.0-20200202132135-d956aad50b08/gio/app/datadir_android.go (about) 1 // SPDX-License-Identifier: Unlicense OR MIT 2 3 // +build android 4 5 package app 6 7 import "C" 8 9 import ( 10 "sync" 11 12 "github.com/gop9/olt/gio/app/internal/window" 13 ) 14 15 var ( 16 dataDirOnce sync.Once 17 dataPath string 18 ) 19 20 func dataDir() (string, error) { 21 dataDirOnce.Do(func() { 22 dataPath = window.GetDataDir() 23 }) 24 return dataPath, nil 25 }