Skip to content

Commit 1907787

Browse files
committed
Remove nil checks for StringishPointerValue
1 parent 87e4123 commit 1907787

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

internal/kibana/security_list/models.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,11 @@ func (m *SecurityListModel) fromAPI(ctx context.Context, apiList *kbapi.Security
133133
m.UpdatedBy = types.StringValue(apiList.UpdatedBy)
134134

135135
// Set optional _version field
136-
if apiList.UnderscoreVersion != nil {
137-
m.VersionID = utils.StringishPointerValue(apiList.UnderscoreVersion)
138-
} else {
139-
m.VersionID = types.StringNull()
140-
}
136+
m.VersionID = utils.StringishPointerValue(apiList.UnderscoreVersion)
141137

142-
if apiList.Deserializer != nil {
143-
m.Deserializer = utils.StringishPointerValue(apiList.Deserializer)
144-
} else {
145-
m.Deserializer = types.StringNull()
146-
}
138+
m.Deserializer = utils.StringishPointerValue(apiList.Deserializer)
147139

148-
if apiList.Serializer != nil {
149-
m.Serializer = utils.StringishPointerValue(apiList.Serializer)
150-
} else {
151-
m.Serializer = types.StringNull()
152-
}
140+
m.Serializer = utils.StringishPointerValue(apiList.Serializer)
153141

154142
if apiList.Meta != nil {
155143
metaBytes, err := json.Marshal(apiList.Meta)

0 commit comments

Comments
 (0)