mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-07-13 05:09:09 +00:00
add shellescapse, update deps
This commit is contained in:
parent
bf4a0c8d4a
commit
f373792c06
10 changed files with 182 additions and 85 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/alessio/shellescape"
|
||||
"github.com/speatzle/go-passbolt-cli/util"
|
||||
"github.com/speatzle/go-passbolt/helper"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -47,6 +48,6 @@ func FolderGet(cmd *cobra.Command, args []string) error {
|
|||
return fmt.Errorf("Getting Folder: %w", err)
|
||||
}
|
||||
fmt.Printf("FolderParentID: %v\n", folderParentID)
|
||||
fmt.Printf("Name: %v\n", name)
|
||||
fmt.Printf("Name: %v\n", shellescape.StripUnsafe(name))
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/alessio/shellescape"
|
||||
"github.com/speatzle/go-passbolt-cli/util"
|
||||
"github.com/speatzle/go-passbolt/api"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -73,7 +74,7 @@ func FolderList(cmd *cobra.Command, args []string) error {
|
|||
case "folderparentid":
|
||||
entry[i] = folder.FolderParentID
|
||||
case "name":
|
||||
entry[i] = folder.Name
|
||||
entry[i] = shellescape.StripUnsafe(folder.Name)
|
||||
default:
|
||||
cmd.SilenceUsage = false
|
||||
return fmt.Errorf("Unknown Column: %v", columns[i])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue