cloud-game/pkg/environment/env.go
sergystepanov 7bc9661b3d
Add experimental core's SRAM save/load (#273)
* 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
2021-02-06 01:12:24 +03:00

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
}