From a093240c39040bc899afb34b42cbfe02520e7d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Hedenstro=CC=88m?= <erik@hedenstroem.com> Date: Mon, 2 Oct 2023 22:15:03 +0200 Subject: [PATCH] Fixed unkeyed fields warning --- cmd/clients.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/clients.go b/cmd/clients.go index 574e031..ba1da9a 100644 --- a/cmd/clients.go +++ b/cmd/clients.go @@ -21,7 +21,7 @@ var clientsCmd = &cobra.Command{ filter := bson.D{} if fixedIp { filter = bson.D{ - bson.E{"$and", bson.A{ + bson.E{Key: "$and", Value: bson.A{ bson.M{"use_fixedip": bson.M{"$exists": true}}, bson.M{"use_fixedip": bson.M{"$eq": true}}, }}, @@ -29,8 +29,8 @@ var clientsCmd = &cobra.Command{ } if dynamicIp { filter = bson.D{ - bson.E{"$or", bson.A{ - bson.D{{"use_fixedip", bson.M{"$not": bson.M{"$exists": true}}}}, + bson.E{Key: "$or", Value: bson.A{ + bson.D{{Key: "use_fixedip", Value: bson.M{"$not": bson.M{"$exists": true}}}}, bson.M{"use_fixedip": bson.M{"$ne": true}}, }}, } -- GitLab