func (f *FormattingOptions) ResolveFormatVersion() error {
	switch f.Version {
	case FormatVersion2:
		f.EnablePasswordChange = true
		f.IndexVersion = index.Version2
		f.EpochParameters = epoch.DefaultParameters()

		return nil

	case FormatVersion1:
		f.EnablePasswordChange = false
		f.IndexVersion = index.Version1
		f.EpochParameters = epoch.Parameters{}

		return nil

	default:
		return errors.Errorf("Unsupported format version: %v", f.Version)
	}
}
// ResolveFormatVersion applies format options parameters based on the format version.
ResolveFormatVersion applies format options parameters based on the format version.
// ResolveFormatVersion applies format options parameters based on the format version .
func (f *FormattingOptions) ResolveFormatVersion() error {
	switch f.Version {
	case FormatVersion2:
		f.EnablePasswordChange = true
		f.IndexVersion = index.Version2
		f.EpochParameters = epoch.DefaultParameters()
		return nil
	case FormatVersion1:
		f.EnablePasswordChange = false
		f.IndexVersion = index.Version1
		f.EpochParameters = epoch.Parameters{}
		return nil
	default:
		return errors.Errorf("Unsupported format version: %v", f.Version)
	}
}
func ( f * FormattingOptions ) ResolveFormatVersion ( ) error { switch f . Version { case FormatVersion2 : f . EnablePasswordChange = true f . IndexVersion = index . Version2 f . EpochParameters = epoch . DefaultParameters ( ) return nil case FormatVersion1 : f . EnablePasswordChange = false f . IndexVersion = index . Version1 f . EpochParameters = epoch . Parameters { } return nil default : return errors . Errorf ( " " , f . Version ) } }
ResolveFormatVersion applies format options parameters based on the format version.
ResolveFormatVersion applies format options parameters based on the format version .