func Writeable(cheatpaths []Cheatpath) (Cheatpath, error) {

	// iterate backwards over the cheatpaths
	// NB: we're going backwards because we assume that the most "local"
	// cheatpath will be specified last in the configs
	for i := len(cheatpaths) - 1; i >= 0; i-- {

		// if the cheatpath is not read-only, it is writeable, and thus returned
		if cheatpaths[i].ReadOnly == false {
			return cheatpaths[i], nil
		}

	}

	// otherwise, return an error
	return Cheatpath{}, fmt.Errorf("no writeable cheatpaths found")
}
// Writeable returns a writeable Cheatpath
Writeable returns a writeable Cheatpath
// Writeable returns a writeable Cheatpath
func Writeable(cheatpaths []Cheatpath) (Cheatpath, error) {
	for i := len(cheatpaths) - 1; i >= 0; i-- {
		if cheatpaths[i].ReadOnly == false {
			return cheatpaths[i], nil
		}
	}
	return Cheatpath{}, fmt.Errorf("no writeable cheatpaths found")
}
func Writeable ( cheatpaths [ ] Cheatpath ) ( Cheatpath , error ) { for i := len ( cheatpaths ) - 1 ; i >= 0 ; i -- { if cheatpaths [ i ] . ReadOnly == false { return cheatpaths [ i ] , nil } } return Cheatpath { } , fmt . Errorf ( " " ) }
Writeable returns a writeable Cheatpath
Writeable returns a writeable Cheatpath
// iterate backwards over the cheatpaths // NB: we're going backwards because we assume that the most "local" // cheatpath will be specified last in the configs // if the cheatpath is not read-only, it is writeable, and thus returned // otherwise, return an error