Skip to content

Commit

Permalink
style: format code with Gofumpt and Prettier
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 75cb403 according to the output
from Gofumpt and Prettier.

Details: #2639
  • Loading branch information
deepsource-autofix[bot] authored Sep 26, 2024
1 parent 75cb403 commit fd483f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/net/grpc/errdetails/errdetails.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const (
ValdResourceOwner = "vdaas.org vald team <[email protected]>"
ValdGRPCResourceTypePrefix = "github.com/vdaas/vald/apis/grpc/v1"

typePrefix = "type.googleapis.com/google.rpc."
typePrefix = "type.googleapis.com/google.rpc."
typePrefixV1 = "type.googleapis.com/rpc.v1."
)

Expand Down Expand Up @@ -84,7 +84,7 @@ func (d *Detail) MarshalJSON() (body []byte, err error) {
if d == nil {
return nil, nil

Check warning on line 85 in internal/net/grpc/errdetails/errdetails.go

View check run for this annotation

Codecov / codecov/patch

internal/net/grpc/errdetails/errdetails.go#L83-L85

Added lines #L83 - L85 were not covered by tests
}
switch strings.TrimPrefix(strings.TrimPrefix(d.TypeURL, typePrefix), typePrefixV1){
switch strings.TrimPrefix(strings.TrimPrefix(d.TypeURL, typePrefix), typePrefixV1) {
case DebugInfoMessageName:
m, ok := d.Message.(*DebugInfo)
if ok {
Expand Down Expand Up @@ -314,7 +314,7 @@ func AnyToErrorDetail(a *types.Any) proto.Message {
return nil
}
var err error
switch strings.TrimPrefix(strings.TrimPrefix(a.GetTypeUrl(), typePrefix), typePrefixV1){
switch strings.TrimPrefix(strings.TrimPrefix(a.GetTypeUrl(), typePrefix), typePrefixV1) {
case DebugInfoMessageName:

Check warning on line 318 in internal/net/grpc/errdetails/errdetails.go

View check run for this annotation

Codecov / codecov/patch

internal/net/grpc/errdetails/errdetails.go#L317-L318

Added lines #L317 - L318 were not covered by tests
var m DebugInfo
err = types.UnmarshalAny(a, &m)
Expand Down

0 comments on commit fd483f8

Please sign in to comment.