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

Consistent annotation names #2140

Merged
merged 1 commit into from
May 18, 2024
Merged

Consistent annotation names #2140

merged 1 commit into from
May 18, 2024

Commits on May 3, 2024

  1. Consistent annotation names

    Add `Annotation` suffix to the private annotations to allow nicer code
    using the constants.
    
    For example one can use the current annotation names as a temporary
    variable instead of unclear shortcut. Instead of this:
    
        rag := flagsFromAnnotation(c, f, requiredAsGroup)
        me := flagsFromAnnotation(c, f, mutuallyExclusive)
        or := flagsFromAnnotation(c, f, oneRequired)
    
    We can use now:
    
        requiredAsGrop := flagsFromAnnotation(c, f, requiredAsGroupAnnotation)
        mutuallyExclusive := flagsFromAnnotation(c, f, mutuallyExclusiveAnnotation)
        oneRequired := flagsFromAnnotation(c, f, oneRequiredAnnotation)
    
    Example taken from spf13#2105.
    nirs committed May 3, 2024
    Configuration menu
    Copy the full SHA
    333e12b View commit details
    Browse the repository at this point in the history