packageloader

package
v0.0.0-...-235cd3c Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package packageloader provides helpers for loading packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

A Cache caches loaded packages for a given package path.

func (*Cache) Get

func (c *Cache) Get(cfg *packages.Config, path string) (pkg *packages.Package)

Get loads a package from the cache for a given config and package. It returns nil if package is not found.

func (*Cache) Put

func (c *Cache) Put(cfg *packages.Config, path string, pkg *packages.Package)

Put stores a loaded package pkg for a given configuration and package path.

Jump to

Keyboard shortcuts

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