Skip to content

Replace internal/reflect.isValidFieldName with internal/fwschema.IsValidAttributeName #725

Open
@bflad

Description

@bflad

Module version

v1.2.0

Use-cases

There are multiple places in the internal logic, such as the internal/reflect package isValidFieldName function, which contain the checking logic for valid attribute names. The internal/fwschema implementation contains a pre-compiled regular expression, which may give a very slight performance bump since its called every time struct tags are handled, for example.

Proposal

On the tin -- centralize logic to internal/fwschema since that should contain everything about "schemas".

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtIssues tracking technical debt that we're carrying.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions