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

packp: Actions should have type Action #420

Merged
merged 1 commit into from Dec 10, 2021
Merged

packp: Actions should have type Action #420

merged 1 commit into from Dec 10, 2021

Commits on Nov 28, 2021

  1. packp: Actions should have type Action

    Per the [Go Spec](https://go.dev/ref/spec#Constant_declarations),
    the following yields the type `Action` for `Bar` and `Baz`
    only if there is no `=`.
    
        const (
            Foo Action = ...
            Bar
            Baz
        )
    
    The following has the type `Action` for the first item,
    but not the rest. Those are untyped constants
    of the corresponding type.
    
        const (
            Foo Action = ...
            Bar        = ...
            Baz        = ...
        )
    
    This means that `packp.{Update, Delete, Invalid}` are currently
    untyped string constants, and not `Action` constants
    as was intended here.
    
    This change fixes these.
    abhinav committed Nov 28, 2021
    Copy the full SHA
    fe308ea View commit details
    Browse the repository at this point in the history