[#77] protogen: Initial implementation
Some checks failed
DCO action / DCO (pull_request) Successful in 43s
Tests and linters / Tests (1.19) (pull_request) Successful in 42s
Tests and linters / Lint (pull_request) Failing after 52s
Tests and linters / Tests (1.20) (pull_request) Successful in 50s
Tests and linters / Tests with -race (pull_request) Successful in 1m10s
Some checks failed
DCO action / DCO (pull_request) Successful in 43s
Tests and linters / Tests (1.19) (pull_request) Successful in 42s
Tests and linters / Lint (pull_request) Failing after 52s
Tests and linters / Tests (1.20) (pull_request) Successful in 50s
Tests and linters / Tests with -race (pull_request) Successful in 1m10s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
5febaebbd7
commit
6e8a0e09af
115 changed files with 36087 additions and 20397 deletions
21
util/protogen/internal_gengo/writer.go
Normal file
21
util/protogen/internal_gengo/writer.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package internal_gengo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func notZero(name string) string {
|
||||
return fmt.Sprintf("%s != 0", name)
|
||||
}
|
||||
|
||||
func notEmpty(name string) string {
|
||||
return fmt.Sprintf("len(%s) != 0", name)
|
||||
}
|
||||
|
||||
func identity(name string) string {
|
||||
return name
|
||||
}
|
||||
|
||||
func notNil(name string) string {
|
||||
return fmt.Sprintf("%s != nil", name)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue