From 14f189261aa41bc672dd832a4a3a9f9d230ae15f Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Wed, 13 Apr 2022 11:29:46 +0200 Subject: [PATCH] fix bad usage of type --- resource/list.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resource/list.go b/resource/list.go index 8397325..93d9d59 100644 --- a/resource/list.go +++ b/resource/list.go @@ -27,7 +27,7 @@ func init() { ResourceListCmd.Flags().Bool("favorite", false, "Resources that are marked as favorite") ResourceListCmd.Flags().Bool("own", false, "Resources that are owned by me") - ResourceListCmd.Flags().StringArrayP("group", "g", []string{}, "Resources that are shared with group") + ResourceListCmd.Flags().StringP("group", "g", "", "Resources that are shared with group") ResourceListCmd.Flags().StringArrayP("folder", "f", []string{}, "Resources that are in folder") ResourceListCmd.Flags().StringArrayP("column", "c", []string{"ID", "FolderParentID", "Name", "Username", "URI"}, "Columns to return, possible Columns:\nID, FolderParentID, Name, Username, URI, Password, Description") @@ -42,7 +42,7 @@ func ResourceList(cmd *cobra.Command, args []string) error { if err != nil { return err } - groups, err := cmd.Flags().GetStringArray("group") + group, err := cmd.Flags().GetString("group") if err != nil { return err } @@ -70,7 +70,7 @@ func ResourceList(cmd *cobra.Command, args []string) error { resources, err := client.GetResources(ctx, &api.GetResourcesOptions{ FilterIsFavorite: favorite, FilterIsOwnedByMe: own, - FilterIsSharedWithGroup: groups, + FilterIsSharedWithGroup: group, FilterHasParent: folderParents, }) if err != nil {