Skip to content

Commit

Permalink
Encode the "none" data type value as '{}' (not null)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simeon Miteff committed Jul 1, 2024
1 parent d16a131 commit d2d127f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/encoding/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ func Table(value map[Data]Data) Data {
func None() Data {
return Data{
DataType: TypeNone,
DataValue: nil,
DataValue: make(map[string]interface{}),
}
}
2 changes: 1 addition & 1 deletion pkg/encoding/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func TestData_Event(t *testing.T) {
func TestData_None(t *testing.T) {
wantData := Data{
DataType: "none",
DataValue: nil,
DataValue: make(map[string]interface{}),
}

gotData := None()
Expand Down

0 comments on commit d2d127f

Please sign in to comment.