Skip to content

Commit 3db644c

Browse files
author
Ma Shimiao
authored
Merge pull request #448 from liangchenye/runtimeenv
use default runtime to test when the runtime env is not set
2 parents 9e0e42d + 0f8d01e commit 3db644c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

validation/validation_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ var (
1818
)
1919

2020
func init() {
21-
runtime = os.Getenv("RUNTIME")
21+
runtimeInEnv := os.Getenv("RUNTIME")
22+
if runtimeInEnv != "" {
23+
runtime = runtimeInEnv
24+
}
2225
}
2326

2427
func runtimeValidate(runtime string, g *generate.Generator) error {

0 commit comments

Comments
 (0)