github.com/apptainer/singularity@v3.1.1+incompatible/cmd/internal/cli/capability_linux.go (about) 1 // Copyright (c) 2018-2019, Sylabs Inc. All rights reserved. 2 // This software is licensed under a 3-clause BSD license. Please consult the 3 // LICENSE.md file distributed with the sources of this project regarding your 4 // rights to use or distribute this software. 5 6 package cli 7 8 import ( 9 "errors" 10 11 "github.com/spf13/cobra" 12 "github.com/sylabs/singularity/docs" 13 ) 14 15 // contains flag variables for capability commands 16 var ( 17 CapUser string 18 CapGroup string 19 CapListAll bool 20 ) 21 22 func init() { 23 SingularityCmd.AddCommand(CapabilityCmd) 24 CapabilityCmd.AddCommand(CapabilityAddCmd) 25 CapabilityCmd.AddCommand(CapabilityDropCmd) 26 CapabilityCmd.AddCommand(CapabilityListCmd) 27 CapabilityCmd.AddCommand(CapabilityAvailCmd) 28 } 29 30 // CapabilityCmd is the capability command 31 var CapabilityCmd = &cobra.Command{ 32 RunE: func(cmd *cobra.Command, args []string) error { 33 return errors.New("Invalid command") 34 }, 35 DisableFlagsInUseLine: true, 36 37 Aliases: []string{"caps"}, 38 Use: docs.CapabilityUse, 39 Short: docs.CapabilityShort, 40 Long: docs.CapabilityLong, 41 Example: docs.CapabilityExample, 42 SilenceErrors: true, 43 }