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>
21 lines
326 B
Go
21 lines
326 B
Go
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)
|
|
}
|