func (fs *flagSet) AddPermissionFilter(permission *string) *flagutil.FlagOptions {
	flagName := "permission"

	permissionTypeFilterMap := aclcmdutil.GetPermissionTypeFilterMap()

	permissions := make([]string, 0, len(permissionTypeFilterMap))
	for i := range permissionTypeFilterMap {
		permissions = append(permissions, i)
	}

	fs.StringVar(
		permission,
		flagName,
		aclcmdutil.PermissionANY,
		flagutil.FlagDescription(fs.factory.Localizer, "kafka.acl.common.flag.permission.description", permissions...),
	)

	_ = fs.cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		return permissions, cobra.ShellCompDirectiveNoSpace
	})

	return flagutil.WithFlagOptions(fs.cmd, flagName)
}
// AddPermissionFilter adds a flag for ACL permissions filters
AddPermissionFilter adds a flag for ACL permissions filters
// AddPermissionFilter adds a flag for ACL permissions filters
func (fs *flagSet) AddPermissionFilter(permission *string) *flagutil.FlagOptions {
	flagName := "permission"
	permissionTypeFilterMap := aclcmdutil.GetPermissionTypeFilterMap()
	permissions := make([]string, 0, len(permissionTypeFilterMap))
	for i := range permissionTypeFilterMap {
		permissions = append(permissions, i)
	}
	fs.StringVar(
		permission,
		flagName,
		aclcmdutil.PermissionANY,
		flagutil.FlagDescription(fs.factory.Localizer, "kafka.acl.common.flag.permission.description", permissions...),
	)
	_ = fs.cmd.RegisterFlagCompletionFunc(flagName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		return permissions, cobra.ShellCompDirectiveNoSpace
	})
	return flagutil.WithFlagOptions(fs.cmd, flagName)
}
func ( fs * flagSet ) AddPermissionFilter ( permission * string ) * flagutil . FlagOptions { flagName := " " permissionTypeFilterMap := aclcmdutil . GetPermissionTypeFilterMap ( ) permissions := make ( [ ] string , 0 , len ( permissionTypeFilterMap ) ) for i := range permissionTypeFilterMap { permissions = append ( permissions , i ) } fs . StringVar ( permission , flagName , aclcmdutil . PermissionANY , flagutil . FlagDescription ( fs . factory . Localizer , " " , permissions ... ) , ) _ = fs . cmd . RegisterFlagCompletionFunc ( flagName , func ( cmd * cobra . Command , args [ ] string , toComplete string ) ( [ ] string , cobra . ShellCompDirective ) { return permissions , cobra . ShellCompDirectiveNoSpace } ) return flagutil . WithFlagOptions ( fs . cmd , flagName ) }
AddPermissionFilter adds a flag for ACL permissions filters
AddPermissionFilter adds a flag for ACL permissions filters