Documentation
¶
Overview ¶
Package interfaces provides functions to retrieve information about interfaces in a Golang project
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceInfo ¶
type InterfaceInfo struct {
Package string `json:"package"` // package name where the interface is declared
File string `json:"file"` // file name where the interface is declared
Name string `json:"name"` // interface name
Methods int `json:"methods"` // number of method in this interface
}
InterfaceInfo represents general information about a specific interface
type InterfaceMetrics ¶
type InterfaceMetrics struct {
AverageMethods float64 `json:"average_methods"` // average number of methods declared in all the interfaces
InterfaceMaxMethods []InterfaceInfo `json:"max_methods"` // interfaces which declares the max number of methods
InterfaceMinMethods []InterfaceInfo `json:"min_methods"` // interfaces which declares the min number of methods
}
InterfaceMetrics represents general metrics about interfaces in a Golang project
func ResolveInterfaceMetrics ¶
func ResolveInterfaceMetrics(prj *project.ProjectInfo) (*InterfaceMetrics, error)
ResolveInterfaceMetrics retrieves metrics about interfaces in the provided Golang project.
An error is returned when it's not possible to get the packages information
Click to show internal directories.
Click to hide internal directories.