source

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommentGroupString

func CommentGroupString(commentGroup *ast.CommentGroup) string

func GoColumnTagCommentLineRegex

func GoColumnTagCommentLineRegex(ctx context.Context, goColumnTag string) *regexp.Regexp

Types

type FileSource

type FileSource struct {
	PackageName        string
	FilePath           string
	SourceRelativePath string

	StructSources StructSourceSlice
}

type FileSourceSlice

type FileSourceSlice []*FileSource

type PackageSource

type PackageSource struct {
	PackageName        string
	PackageImportPath  string
	DirPath            string
	SourceRelativePath string

	FileSources FileSourceSlice
}

type PackageSourceSlice

type PackageSourceSlice []*PackageSource

func Parse

func Parse(ctx context.Context, args []string) (PackageSourceSlice, error)

func (*PackageSourceSlice) AddPackageSource

func (pss *PackageSourceSlice) AddPackageSource(packageSource *PackageSource)

type StructSource

type StructSource struct {
	PackageName  string
	Position     token.Position
	TypeSpec     *ast.TypeSpec
	StructType   *ast.StructType
	CommentGroup *ast.CommentGroup
	// contains filtered or unexported fields
}

func (*StructSource) ExtractTableName

func (s *StructSource) ExtractTableName(ctx context.Context, goColumnTag string) string

func (*StructSource) GoString

func (s *StructSource) GoString() string

type StructSourceSlice

type StructSourceSlice []*StructSource

Jump to

Keyboard shortcuts

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