code: func (l *Logger) timeFromName(filename, prefix, ext string) (time.Time, error) {
  	if !strings.HasPrefix(filename, prefix) {
  		return time.Time{}, errors.New("mismatched prefix")
  	}
  	if !strings.HasSuffix(filename, ext) {
  		return time.Time{}, errors.New("mismatched extension")
  	}
  	ts := filename[len(prefix) : len(filename)-len(ext)]
  	return time.Parse(backupTimeFormat, ts)
  }
docs: // timeFromName extracts the formatted time from the filename by stripping off
  // the filename's prefix and extension. This prevents someone's filename from
  // confusing time.parse.