Skip to content

Commit

Permalink
update: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ryomak committed Mar 31, 2024
1 parent 2b7c31c commit 921ab27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ go get -u github.com/ryomak/serrs
# Usage
## Create an error
```go
var HogeError = serrs.New(serrs.StringCodeUnexpected,"unexpected error")
var HogeError = serrs.New(serrs.StringCode("unexpected"),"unexpected error")
```

or
Expand Down Expand Up @@ -80,7 +80,7 @@ if err := DoSomething(); err != nil {

## check error match
```go
var HogeError = serrs.New(serrs.StringCodeUnexpected,"unexpected error")
var HogeError = serrs.New(serrs.StringCode("unexpected"),"unexpected error")

if serrs.Is(HogeError) {

Expand Down

0 comments on commit 921ab27

Please sign in to comment.