Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bigip.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,11 @@ func marshal(to, from interface{}) error {
toField := toVal.Field(i)
toFieldType := toType.Field(i)
fromField := fromVal.FieldByName(toFieldType.Name)
if fromField.Interface() != nil && fromField.Kind() == toField.Kind() {
if !fromField.IsValid() {
// Skip missing fields in fromVal
continue
}
if fromField.IsValid() && fromField.Interface() != nil && fromField.Kind() == toField.Kind() {
toField.Set(fromField)
} else if toField.Kind() == reflect.Bool && fromField.Kind() == reflect.String {
switch fromField.Interface() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/f5devcentral/go-bigip
module github.com/charanm08/go-bigip

go 1.20

Expand Down