Skip to content

Proposal: return first arg #667

@haohanyuzmx

Description

@haohanyuzmx

Are there any functions that return just the first parameter while ignoring errors, similar to the "must" series functions?

func First[T any](value T, other any) T {
    return value
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions