gddo

package
v0.0.0-...-5fe729b Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

Package gddo is a simple client library for accessing the godoc.org API.

It provides a single utility to fetch the importers of a Go package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// UserAgent is used for outbound requests to godoc.org API, if set to non-empty value.
	UserAgent string
}

Client manages communication with the godoc.org API.

func (*Client) GetImporters

func (c *Client) GetImporters(importPath string) (Importers, error)

GetImporters fetches the importers of Go package with specified importPath via godoc.org API.

type Importers

type Importers struct {
	Results []Package
}

Importers contains the list of Go packages that import a given Go package.

type Package

type Package struct {
	Path     string // Import path of the package.
	Synopsis string // Synopsis of the package.
}

Package represents a Go package.

Jump to

Keyboard shortcuts

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