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

Add VerificationLevel value consts and a typedef for int #136

Merged
merged 2 commits into from
Feb 28, 2016
Merged

Add VerificationLevel value consts and a typedef for int #136

merged 2 commits into from
Feb 28, 2016

Conversation

valleyflowerbear
Copy link
Contributor

This time it'll work! :)


// Constants for VerificationLevel levels from 0 to 3 inclusive
const (
VerificationLevelNone VerificationLevel = iota
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the = iota on every line after the first

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const (
    VerificationLevelNone   VerificationLevel = iota
    VerificationLevelLow    VerificationLevel
    VerificationLevelMedium VerificationLevel
    VerificationLevelHigh   VerificationLevel
)

Like this?

Edit: Nevermind, I got it.

@iopred
Copy link
Collaborator

iopred commented Feb 26, 2016

Even better:

const (
VerificationLevelNone VerificationLevel = iota
VerificationLevelLow
VerificationLevelMedium
VerificationLevelHigh
)

@valleyflowerbear
Copy link
Contributor Author

Yeah that's what I ended up doing, the way I asked about won't even compile

@bwmarrin bwmarrin added this to the v0.12.0 milestone Feb 28, 2016
@bwmarrin bwmarrin added the feature Major feature implementation label Feb 28, 2016
@bwmarrin
Copy link
Owner

Yay :)

bwmarrin added a commit that referenced this pull request Feb 28, 2016
BREAKING -- Add VerificationLevel value consts and a typedef for int
@bwmarrin bwmarrin merged commit f5b21ea into bwmarrin:develop Feb 28, 2016
alex-j-butler pushed a commit to alex-j-butler/discordgo that referenced this pull request Nov 5, 2016
BREAKING -- Add VerificationLevel value consts and a typedef for int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Major feature implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants