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 script for generating error constants #35

Closed
wants to merge 5 commits into from

Conversation

gernest
Copy link

@gernest gernest commented Sep 3, 2018

closes #32

This allows building outside og GOPATH
if err != nil {
log.Fatal(err)
}
var keys []int
Copy link

Choose a reason for hiding this comment

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

More descriptive variable names woulod be good. Examples/suggestions: o --> opts, f --> outpFile m --> codeToDesc, keys --> codes, etc.

@gernest gernest changed the title [W.I.P] add script for generating error constants add script for generating error constants Sep 4, 2018
@gernest
Copy link
Author

gernest commented Sep 4, 2018

@ORBAT I think this is ready for review

@ORBAT
Copy link

ORBAT commented Sep 4, 2018

Hey, how about reading the JSON file from an URL (with handling for http[s]:// and file:// schemas), and defaulting to https://raw.githubusercontent.com/ably/ably-common/master/protocol/errors.json? That'd always point to the master version and nobody would have to download it unless needed.

@gernest
Copy link
Author

gernest commented Sep 4, 2018

@ORBAT I will add -url flag to support downloading from url.

@ORBAT
Copy link

ORBAT commented Sep 4, 2018

Closing this as per discussion on Slack.

@ORBAT ORBAT closed this Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Include error constants in includes in this repo?
2 participants