Skip to content

Commit

Permalink
例外処理を短く
Browse files Browse the repository at this point in the history
  • Loading branch information
Hueter57 committed Jul 17, 2024
1 parent 3f320d1 commit b507575
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions router/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ func (h Handlers) GeneratePKCE(c echo.Context) error {
var randSrcPool = sync.Pool{
New: func() interface{} {
var b [32]byte
_, err := crand.Read(b[:])
if err != nil {
if _, err := crand.Read(b[:]); err != nil {
panic(err)

Check warning on line 133 in router/auth.go

View check run for this annotation

Codecov / codecov/patch

router/auth.go#L131-L133

Added lines #L131 - L133 were not covered by tests
}
return rand.New(rand.NewChaCha8(b))

Check warning on line 135 in router/auth.go

View check run for this annotation

Codecov / codecov/patch

router/auth.go#L135

Added line #L135 was not covered by tests
Expand Down

0 comments on commit b507575

Please sign in to comment.