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

usage with comments in a .go file? #630

Open
gregwebs opened this issue Feb 27, 2023 · 1 comment
Open

usage with comments in a .go file? #630

gregwebs opened this issue Feb 27, 2023 · 1 comment

Comments

@gregwebs
Copy link

It would be easier to try this project out if instead of a .gobra file one could put the gobra extension into comments so the file could still be used as a regular .go file.

@ArquintL
Copy link
Member

Hi Greg,
Thanks for your interest in Gobra. While we support verifying .go files, it is indeed unfortunate that this is not yet reflected in the tutorial.
If you put your specification into so-called specification comments, Gobra will consider them in .go files. Specification comments either start with //@ or are delimited by /*@ and @*/. Also note that you can optionally add a whitespace before/after the @ sign to be compliant with comments in Go >= 1.19

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

No branches or pull requests

2 participants