Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing implementation of --exclude #47

Merged
merged 1 commit into from
Oct 8, 2024
Merged

Conversation

zostay
Copy link
Owner

@zostay zostay commented Oct 8, 2024

Fixes #42

This does the following:

  • The --exclude option is now implemented. Previously, the flag was defined, but was ignored entirely.
  • Exclusions set by either --exclude-index or --exclude will also impact random when the --book option is used. Previously, the --book option ignored exclusions.

This pull request includes changes to improve the handling of excluded references and enhance error handling when looking up books in the random package. The most important changes include initializing the excludeRefs slice, appending to excludeRefs correctly, and improving error messages for book lookups.

Improvements to handling excluded references:

  • cmd/random.go: Initialized the excludeRefs slice and appended excluded references to it before applying the ExcludeReferences option. [1] [2]

Enhancements to error handling:

  • pkg/ref/random.go: Improved error handling when looking up books by adding detailed error messages and ensuring the first verse of the book is used correctly.

@zostay zostay merged commit 38a5349 into master Oct 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The --exclude option to random does not work
1 participant