parser

package
v0.0.0-...-6b3f725 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(magicComment string, tags []string, allStructs, onlyTaggedFields bool) *parser

Types

type Field

type Field struct {
	Name string
	Tags []Tag
}

Represents a singlle field of a struct

type File

type File struct {
	FileName    string
	PackageName string
	Structs     []Struct
}

Represents a go file. It contains tag info of all the eligible struct fields.

type Struct

type Struct struct {
	Name   string
	Fields []Field
}

Represents a single struct which had magic comment on it.

type Tag

type Tag struct {
	Name  string
	Value string
}

Represents a single tag of a struct field.

Jump to

Keyboard shortcuts

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