passgo/cmd/passgo-gui/impl_android.go

32 lines
632 B
Go
Raw Normal View History

2019-09-06 11:43:14 -04:00
//+build !darwin
package main
import (
"os"
"golang.org/x/image/font/gofont/goregular"
"golang.org/x/image/font/sfnt"
)
func init() {
log(Info, "Android start")
2019-09-10 11:31:57 -04:00
var err error
2019-09-06 11:43:14 -04:00
regular, err = sfnt.Parse(goregular.TTF)
if err != nil {
log(Fatal, "Cannot parse default font: ", err)
}
confDir = app.DataDir()
2019-09-06 11:43:14 -04:00
if _, err := os.Stat(confDir); os.IsNotExist(err) {
err = os.MkdirAll(confDir, 0700)
if err != nil {
log(Info, "Cannot create configuration directory ", confDir)
log(Fatal, err)
} else {
log(Info, "Configuration directory created")
}
} else {
log(Info, "Configuration directory found")
2019-09-06 11:43:14 -04:00
}
}