enum_docs

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package enum_docs exercises scanCtx.findEnumValue description building on const blocks that carry per-value doc comments and multi-name value specs so both the docs loop and the names separator are walked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel string

Channel is an enum with a multi-name value spec so that findEnumValue walks the separator branch in its names loop.

swagger:enum Channel

const (
	// ChannelEmail and ChannelSMS share a single spec.
	ChannelEmail, ChannelSMS Channel = "email", "sms"

	// ChannelPush is the push notification channel.
	ChannelPush Channel = "push"
)

type Notification

type Notification struct {
	// required: true
	ID int64 `json:"id"`

	// The priority level.
	Priority Priority `json:"priority"`

	// The delivery channel.
	Channel Channel `json:"channel"`
}

Notification holds both enums so that the scanner emits schemas with the enriched descriptions produced by findEnumValue.

swagger:model Notification

type Priority

type Priority string

Priority is an annotated enum string.

swagger:enum Priority

const (
	// PriorityLow is a low-priority level.
	PriorityLow Priority = "low"

	// PriorityMed is a medium-priority level.
	PriorityMed Priority = "medium"

	// PriorityHigh is a high-priority level.
	PriorityHigh Priority = "high"
)

Jump to

Keyboard shortcuts

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