aboutsummaryrefslogtreecommitdiff
path: root/tracker/query.go
diff options
context:
space:
mode:
Diffstat (limited to 'tracker/query.go')
-rw-r--r--tracker/query.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tracker/query.go b/tracker/query.go
index 4e233b8..0ab56fc 100644
--- a/tracker/query.go
+++ b/tracker/query.go
@@ -20,7 +20,7 @@ func parseTag(tag string) (string, string) {
return tag, ""
}
-func isEmtpy(v reflect.Value) bool {
+func isZero(v reflect.Value) bool {
switch v.Kind() {
case reflect.String:
return v.String() == ""
@@ -43,7 +43,7 @@ func marshalQuery(v reflect.Value) (string, error) {
name = tag
}
f := v.Field(i)
- if param == "optional" && isEmtpy(f) {
+ if param == "optional" && isZero(f) {
continue
}
switch f.Kind() {