parser

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTargetNotFound = errors.New("target not found")
	ErrParsingFailed  = errors.New("parsing failed")
)

Functions

func CamelToSnake

func CamelToSnake(s string) string

CamelToSnake converts camelCase or PascalCase with numbers to snake_case

func GetTranslationFromComment

func GetTranslationFromComment(comment string) string

GetTranslationFromComment - get enum's translation from comment

func GetValueFromComment

func GetValueFromComment(comment string) string

GetValueFromComment - get enum's string value from comment

Types

type EnumParser

type EnumParser interface {
	GetEnumName() (string, error)
	Parse() (enum.Enum, error)
}

func New

func New(path, fullPath string, goline int) (EnumParser, error)

Jump to

Keyboard shortcuts

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