file_snapshot.go
func (f *FileSnapshotStore) List() ([]*SnapshotMeta, error) {
	// Get the eligible snapshots
	snapshots, err := f.getSnapshots()
	if err != nil {
		f.logger.Printf("[ERR] snapshot: Failed to get snapshots: %v", err)
		return nil, err
	}

	var snapMeta []*SnapshotMeta
	for _, meta := range snapshots {
		snapMeta = append(snapMeta, &meta.SnapshotMeta)
		if len(snapMeta) == f.retain {
			break
		}
	}
	return snapMeta, nil
}
func (f *FileSnapshotStore) List() ([]*SnapshotMeta, error) {
	// Get the eligible snapshots
	snapshots, err := f.getSnapshots()
	if err != nil {
		f.logger.Printf("[ERR] snapshot: Failed to get snapshots: %v", err)
		return nil, err
	}

	var snapMeta []*SnapshotMeta
	for _, meta := range snapshots {
		snapMeta = append(snapMeta, &meta.SnapshotMeta)
		if len(snapMeta) == f.retain {
			break
		}
	}
	return snapMeta, nil
}
func ( f * FileSnapshotStore ) List ( ) ( [ ] * SnapshotMeta , error ) { // Get the eligible snapshots snapshots , err := f . getSnapshots ( ) if err != nil { f . logger . Printf ( " " , err ) return nil , err } var snapMeta [ ] * SnapshotMeta for _ , meta := range snapshots { snapMeta = append ( snapMeta , & meta . SnapshotMeta ) if len ( snapMeta ) == f . retain { break } } return snapMeta , nil }
// List returns available snapshots in the store.
List returns available snapshots in the store .