-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: format code with Gofumpt and Prettier
This commit fixes the style issues introduced in 75cb403 according to the output from Gofumpt and Prettier. Details: #2639 Signed-off-by: kpango <[email protected]>
- Loading branch information
1 parent
75cb403
commit a25afff
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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." | ||
) | ||
|
||
|
@@ -84,7 +84,7 @@ func (d *Detail) MarshalJSON() (body []byte, err error) { | |
if d == nil { | ||
return nil, nil | ||
} | ||
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 { | ||
|
@@ -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: | ||
var m DebugInfo | ||
err = types.UnmarshalAny(a, &m) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters