// AddPermissionCreate adds a flag for ACL permissions
AddPermissionCreate adds a flag for ACL permissions
// AddPermissionCreate adds a flag for ACL permissions
func (fs *flagSet) AddPermissionCreate(permission *string) *flagutil.FlagOptions {
	flagName := "permission"
	permissionTypeMap := aclcmdutil.GetPermissionTypeMap()
	permissions := make([]string, 0, len(permissionTypeMap))
	for i := range permissionTypeMap {
		permissions = append(permissions, i)
	}
	fs.StringVar(
		permission,
		flagName,
		"",
		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 ) AddPermissionCreate ( permission * string ) * flagutil . FlagOptions { flagName := " " permissionTypeMap := aclcmdutil . GetPermissionTypeMap ( ) permissions := make ( [ ] string , 0 , len ( permissionTypeMap ) ) for i := range permissionTypeMap { permissions = append ( permissions , i ) } fs . StringVar ( permission , flagName , " " , 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 ) }
AddPermissionCreate adds a flag for ACL permissions
AddPermissionCreate adds a flag for ACL permissions