goreportcard

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoReportCardHTTPClient

type GoReportCardHTTPClient struct {
	HTTPClient *http.Client
	BaseURL    string
}

GoReportCardHTTPClient is unofficial interface to fetch data from goreportcard.com

func (*GoReportCardHTTPClient) GetReport

func (c *GoReportCardHTTPClient) GetReport(modName string) (*Report, error)

GetReport fetches report from goreportcard.com

type GradeEnum

type GradeEnum string

GradeEnum is goreportcard grade

var (
	GradeAP GradeEnum = "A+"
	GradeA  GradeEnum = "A"
	GradeB  GradeEnum = "B"
	GradeC  GradeEnum = "C"
	GradeD  GradeEnum = "D"
	GradeE  GradeEnum = "E"
	GradeF  GradeEnum = "F"
)

type Report

type Report struct {
	Average   float64   `json:"average"`
	Grade     GradeEnum `json:"grade"`
	NumFiles  uint      `json:"files"`
	NumIssues uint      `json:"issues"`
}

Report from goreportcard about single module

Jump to

Keyboard shortcuts

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