pkgsite

package
v0.0.0-...-239384d Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause, CC-BY-4.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheFile

func CacheFile(t *testing.T) (*os.File, error)

CacheFile returns a default cache file that can be used as an input to TestClient.

For testing.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Default

func Default() *Client

func New

func New(url string) *Client

func TestClient

func TestClient(t *testing.T, useRealPkgsite bool, rw io.ReadWriter) (*Client, error)

TestClient returns a pkgsite client that talks to either a fake server or the real pkg.go.dev, depending on the useRealPkgsite value.

For testing.

func (*Client) KnownModule

func (pc *Client) KnownModule(ctx context.Context, path string) (bool, error)

KnownModule reports whether pkgsite knows that modulePath actually refers to a module.

func (*Client) SetKnownModules

func (pc *Client) SetKnownModules(known []string)

func (*Client) URL

func (pc *Client) URL() string

Jump to

Keyboard shortcuts

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