mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-25 11:03:56 +00:00
* Add experimental core's SRAM save/load * Clean room.go * Update Save RAM states * Update dependencies * Extract emulator states into a separate module * Google Cloud saves don't support save RAM persistence, but save state (.dat) files only. * Add emulator storage path into the configuration file * Verify offline storage path
28 lines
399 B
Go
28 lines
399 B
Go
package environment
|
|
|
|
import "os/user"
|
|
|
|
type Env string
|
|
|
|
const (
|
|
Dev Env = "dev"
|
|
Staging = "staging"
|
|
Production = "prod"
|
|
)
|
|
|
|
func (env *Env) AnyOf(what ...Env) bool {
|
|
for _, cur := range what {
|
|
if *env == cur {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
func GetUserHome() (string, error) {
|
|
me, err := user.Current()
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return me.HomeDir, nil
|
|
}
|