This is an automated email from the ASF dual-hosted git repository.
nlu90 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git
The following commit(s) were added to refs/heads/master by this push:
new a881240d fix: make function state values `omitempty` (#1185)
a881240d is described below
commit a881240db862e48f1791575aecb10ecc149bfa8b
Author: Rui Fu <[email protected]>
AuthorDate: Tue Feb 27 00:59:34 2024 +0800
fix: make function state values `omitempty` (#1185)
* make function state values omitempty
* fix
---
pulsaradmin/pkg/utils/function_state.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pulsaradmin/pkg/utils/function_state.go
b/pulsaradmin/pkg/utils/function_state.go
index 63fa1505..c8a8c4b8 100644
--- a/pulsaradmin/pkg/utils/function_state.go
+++ b/pulsaradmin/pkg/utils/function_state.go
@@ -19,8 +19,8 @@ package utils
type FunctionState struct {
Key string `json:"key"`
- StringValue string `json:"stringValue"`
- ByteValue []byte `json:"byteValue"`
- NumValue int64 `json:"numberValue"`
- Version int64 `json:"version"`
+ StringValue string `json:"stringValue,omitempty"`
+ ByteValue []byte `json:"byteValue,omitempty"`
+ NumValue int64 `json:"numberValue,omitempty"`
+ Version int64 `json:"version,omitempty"`
}