classify

package
v0.34.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package classify provides small classification predicates used by the scanner and by builders to decide whether a given name or comment line belongs to a particular Swagger-annotation family.

The package lives beneath internal/scanner/ because classification is fundamentally a scanner concern: "does this string denote a swagger:xxx construct?" is the same kind of question the scanner asks when indexing packages. Builders that need the same predicate (vendor-extension key filtering, for instance) import from here rather than reaching back into internal/parsers/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAllowedExtension

func IsAllowedExtension(key string) bool

IsAllowedExtension reports whether key is a valid Swagger vendor-extension key — opens with `x-` or `X-`. Mirrors the previous regex `^[Xx]-`: the suffix may be empty (the spec itself rejects empty-suffix keys at a higher level).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL