entity

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package entity contains all entities that are used in every component of the application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	StartLine int
	EndLine   int
	DefLine   int
	Covered   bool
}

type BranchCounter

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

func (*BranchCounter) AddBranch

func (b *BranchCounter) AddBranch(covered bool)

func (*BranchCounter) CoveredString

func (b *BranchCounter) CoveredString() string

func (*BranchCounter) String

func (b *BranchCounter) String() string

func (*BranchCounter) ValidString

func (b *BranchCounter) ValidString() string

type File

type File struct {
	Name           string
	FilePath       string
	Ast            *ast.File
	Methods        []*Method
	LineCoverage   LineCounter
	BranchCoverage BranchCounter
}

type Line

type Line struct {
	Number        int
	CoverageCount int
}

type LineCounter

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

func (*LineCounter) AddLine

func (c *LineCounter) AddLine(covered bool)

func (*LineCounter) CoveredString

func (c *LineCounter) CoveredString() string

func (*LineCounter) String

func (c *LineCounter) String() string

func (*LineCounter) ValidString

func (c *LineCounter) ValidString() string

type Method

type Method struct {
	Name           string
	Body           *ast.BlockStmt
	Lines          []*Line
	Branches       []*Branch
	LineCoverage   LineCounter
	BranchCoverage BranchCounter
	Complexity     int
}

type Package

type Package struct {
	Name           string
	Files          []*File
	Fset           *token.FileSet
	LineCoverage   LineCounter
	BranchCoverage BranchCounter
}

type Project

type Project struct {
	Packages       []*Package
	LineCoverage   LineCounter
	BranchCoverage BranchCounter
}

Jump to

Keyboard shortcuts

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