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.

            Source Files