func SaveFile(p string, v interface{}) error {
	data, err := json.Marshal(v)
	if err != nil {
		return err
	}

	err = fs.MkdirAll(filepath.Dir(p), 0755)
	if err != nil {
		return err
	}

	return afero.WriteFile(fs, p, data, 0600)
}
// SaveFile saves a structured as marshalled JSON
SaveFile saves a structured as marshalled JSON
// SaveFile saves a structured as marshalled JSON
func SaveFile(p string, v interface{}) error {
	data, err := json.Marshal(v)
	if err != nil {
		return err
	}
	err = fs.MkdirAll(filepath.Dir(p), 0755)
	if err != nil {
		return err
	}
	return afero.WriteFile(fs, p, data, 0600)
}
func SaveFile ( p string , v interface { } ) error { data , err := json . Marshal ( v ) if err != nil { return err } err = fs . MkdirAll ( filepath . Dir ( p ) , 0755 ) if err != nil { return err } return afero . WriteFile ( fs , p , data , 0600 ) }
SaveFile saves a structured as marshalled JSON
SaveFile saves a structured as marshalled JSON