-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for internal/errors/grpc.go (#903)
* fix: test case name for grpc error Signed-off-by: hlts2 <[email protected]> * fix: add comment & test case name more clearly Signed-off-by: hlts2 <[email protected]> * fix: add comment & test case for ErrInvalidGRPCPort method Signed-off-by: hlts2 <[email protected]> * fix: apply suggestion Signed-off-by: hlts2 <[email protected]> * Update internal/errors/grpc.go * Update internal/errors/grpc.go * Apply suggestions from code review Co-authored-by: Kiichiro YUKAWA <[email protected]> * fix: apply suggestion about boundary value Signed-off-by: hlts2 <[email protected]> * 🤖 Update license headers / Format go codes and yaml files Signed-off-by: vdaas-ci <[email protected]> Co-authored-by: Kiichiro YUKAWA <[email protected]> Co-authored-by: vdaas-ci <[email protected]>
- Loading branch information
1 parent
fd20606
commit 0e93f6b
Showing
3 changed files
with
608 additions
and
9 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,15 +54,16 @@ var ( | |
) | ||
|
||
type Data struct { | ||
Escape string | ||
Escape string | ||
Maintainer string | ||
Year int | ||
Year int | ||
} | ||
|
||
const ( | ||
defaultMaintainer = "vdaas.org vald team <[email protected]>" | ||
maintainerKey = "MAINTAINER" | ||
defaultMaintainer = "vdaas.org vald team <[email protected]>" | ||
maintainerKey = "MAINTAINER" | ||
) | ||
|
||
func main() { | ||
if len(os.Args) < 2 { | ||
log.Fatal(errors.New("invalid argument")) | ||
|
@@ -171,8 +172,8 @@ func readAndRewrite(path string) error { | |
} | ||
d := Data{ | ||
Maintainer: maintainer, | ||
Year: time.Now().Year(), | ||
Escape: sharpEscape, | ||
Year: time.Now().Year(), | ||
Escape: sharpEscape, | ||
} | ||
if fi.Name() == "LICENSE" { | ||
err = license.Execute(buf, d) | ||
|
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
Oops, something went wrong.