tags

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package tags contains logic for parsing tags from a multiline string.

Index

Constants

View Source
const (
	FormatUnspecified = ""
	FormatJSON        = "json"
	FormatRaw         = "raw"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Format      string
	ArrayTags   []string
	StringTags  []string
	BoolTags    []string
	OutputAll   bool
	PrettyPrint bool
}

Config is the configuration needed to parse tags.

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(set *cli.FlagSet)

type TagParser

type TagParser struct {
	// contains filtered or unexported fields
}

func NewTagParser

func NewTagParser(ctx context.Context, cfg *Config) TagParser

NewTagParser creates a new tag parser.

func (*TagParser) ParseTags

func (p *TagParser) ParseTags(ctx context.Context, v string) (string, error)

Jump to

Keyboard shortcuts

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