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

chore: drop dependency on github.com/pkg/errors #301

Merged
merged 1 commit into from
Apr 19, 2024
Merged

chore: drop dependency on github.com/pkg/errors #301

merged 1 commit into from
Apr 19, 2024

Conversation

blgm
Copy link
Member

@blgm blgm commented Apr 18, 2024

This functionality is mostly available in the standard library (apart from stack traces), and it makes more sense to use the standard library equivalents rather to have a dependency.

This functionality is mostly available in the standard library (apart
from stack traces), and it makes more sense to use the standard library
equivalents rather to have a dependency.
@cf-gitbot
Copy link
Member

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/187458076

The labels on this github issue will be updated when the story is started.

@@ -23,7 +22,7 @@ func (sm ServiceMetadata) MarshalJSON() ([]byte, error) {

b, err := json.Marshal(Alias(sm))
if err != nil {
return []byte{}, errors.Wrap(err, "unmarshallable content in AdditionalMetadata")
return nil, fmt.Errorf("unmarshallable content in AdditionalMetadata: %w", err)
}

var m map[string]interface{}
Copy link
Contributor

Choose a reason for hiding this comment

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

The error returned by json.Unmarshal operation in line 29 is not being checked. It's a good practice in Go to always check for errors. I know it is out of the scope of the PR, but you may want to add the logic

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @zucchinidev. I'll handle this in #303

@blgm blgm merged commit 654f8c1 into main Apr 19, 2024
4 checks passed
@blgm blgm deleted the errors branch April 19, 2024 10:23
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