Skip to content

Improve func delete UX: provide clear guidance when function name is missing #3053

@RayyanSeliya

Description

@RayyanSeliya

Current behavior:

When running func delete without a function name, the command shows a cryptic error message that doesn't help users understand what they need to do:

rayyan@rayyan-seliya:/mnt/c/Users/RAYYAN/Desktop/func$ func delete
Error: name required

This forces users to:
1.Guess what's wrong - unclear what "name required" means
2.Look up documentation to understand the command usage
3.Still not understand the available deletion options

Proposed improvement:

Provide clear, educational guidance about how to delete functions:

Error: function name required for deletion.

Function name is required for deletion.

You can delete functions in two ways:

1. By name :
   func delete myfunction                     Delete function by name
   func delete myfunction --namespace apps    Delete from specific namespace

2. By path :
   func delete --path /path/to/function       Delete function at specific path

Examples:
   func delete myfunction                     Delete 'myfunction' from cluster
   func delete myfunction --namespace prod    Delete from 'prod' namespace
   func delete --path ./myfunction            Delete function at path
  
For more options, run 'func delete --help'

Solution:
Implement a 2-layer error system that provides both technical error information and user-friendly guidance.

Expected Workflow:

According to the official documentation, building requires:

1,.By name : func delete <function-name>

2.By path : func delete --path <path>

The improved error message guides users through both deletion methods with clear examples.

User Impact:

  • Current: Cryptic error → confusion → need to look up documentation
  • Improved:Immediate understanding → better user experience

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions