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

bring over golang standards from CLI repo #1

Merged
merged 4 commits into from
Jul 12, 2022
Merged

bring over golang standards from CLI repo #1

merged 4 commits into from
Jul 12, 2022

Conversation

jaketf
Copy link
Contributor

@jaketf jaketf commented Jul 8, 2022

  • add pre-commit with golangci-lint
  • refactor some error handling to define error "types" that can be wrapped with additional context.

@jaketf jaketf requested a review from chrisghill July 8, 2022 23:40
.github/workflows/release.yaml Outdated Show resolved Hide resolved
if tc.wantError != nil {
if err == nil {
t.Fatalf("Expected error: %s, got nil", tc.wantError.Error())
}
if err.Error() != tc.wantError.Error() {
if !errors.Is(err, tc.wantError) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! I was looking for a better way to do this!

Choose a reason for hiding this comment

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

this is slick

Copy link

@WillBeebe WillBeebe left a comment

Choose a reason for hiding this comment

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

After the change Chris suggested, LGTM

Co-authored-by: Christopher Hill <chris@massdriver.cloud>
@jaketf jaketf merged commit 6866713 into main Jul 12, 2022
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

Successfully merging this pull request may close these issues.

3 participants