passgo/cmd/passgo-gui/impl_android.go
2019-09-19 17:28:15 -04:00

32 lines
632 B
Go

//+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")
var err error
regular, err = sfnt.Parse(goregular.TTF)
if err != nil {
log(Fatal, "Cannot parse default font: ", err)
}
confDir = app.DataDir()
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")
}
}