types

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package types provides functions to count how many elements of each type are part of a Golang project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageTypes

type PackageTypes struct {
	Package string `json:"package"` // package name
	// contains filtered or unexported fields
}

PackageTypes represents the total number of each type of element in a package

func (*PackageTypes) Add

func (c *PackageTypes) Add(ct counter)

type ProjectTypes

type ProjectTypes struct {
	ProjectPackage string         `json:"project_package"` // project's module package
	Packages       int            `json:"packages"`        // number of packages in the module
	PackageDetails []PackageTypes `json:"details"`         // detailed information for each package
	// contains filtered or unexported fields
}

ProjectTypes represents the total number of each type of element in a project

func ResolveProjectTypes

func ResolveProjectTypes(prj *project.ProjectInfo) (*ProjectTypes, error)

ResolveProjectTypes returns a structure of type ProjectTypes which represents the number of each element type in a Golang project.

An error is returned when it's not possible to get the packages information

func (*ProjectTypes) Add

func (c *ProjectTypes) Add(ct counter)

Jump to

Keyboard shortcuts

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