scanner

package
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package scanner exposes a golang source Scanner.

The Scanner scans the internal/assertions package.

It extracts all testify helpers methods, types, and package-level variables and constants.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

func WithCollectDoc

func WithCollectDoc(enabled bool) Option

WithCollectDoc indicates that the scanner should extract more information from comments.

func WithPackage

func WithPackage(pkg string) Option

WithPackage indicates which package is scanned.

func WithWorkDir

func WithWorkDir(dir string) Option

WithWorkDir gives a workdir to the code scanner.

type Scanner

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

Scanner scans the internal/assertions package and extracts all functions, types, and metadata.

func New

func New(opts ...Option) *Scanner

New Scanner ready to Scanner.Scan code.

func (*Scanner) Scan

func (s *Scanner) Scan() (*model.AssertionPackage, error)

Scan a source package an returns a model.AssertionPackage data structure suited for code generation.

Directories

Path Synopsis
Package comments provides utilities for extracting comments from Go source code.
Package comments provides utilities for extracting comments from Go source code.
Package parser provides text parsing utilities for extracting structured information from comments.
Package parser provides text parsing utilities for extracting structured information from comments.
Package signature provides utilities for extracting and formatting Go function signatures and types.
Package signature provides utilities for extracting and formatting Go function signatures and types.

Jump to

Keyboard shortcuts

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