Skip to content

Commit 28a8916

Browse files
committed
chore: check optional data
1 parent 38549b9 commit 28a8916

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/api/test/2024-12-21/helper.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package v20241221
22

33
import (
44
openapi_types "github.com/oapi-codegen/runtime/types"
5+
56
v20241221 "github.com/snyk/code-client-go/internal/api/test/2024-12-21/models"
67
)
78

@@ -84,7 +85,7 @@ func WithProjectId(id openapi_types.UUID) CreateTestOption {
8485

8586
func WithTargetName(name *string) CreateTestOption {
8687
return func(body *CreateTestApplicationVndAPIPlusJSONRequestBody) {
87-
if name == nil {
88+
if name == nil || len(*name) == 0 {
8889
return
8990
}
9091
out := ensureOutput(body)

0 commit comments

Comments
 (0)