github

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package github reads TinyGo's releases from GitHub: the asset listing with its published digests, and the release archive, measured as it streams in.

Index

Constants

This section is empty.

Variables

View Source
var ErrNetworkForbidden = fmt.Errorf("%w: the environment declares no TinyGo release download from GitHub", goenv.ErrNetworkForbidden)

ErrNetworkForbidden reports that the environment declares no network, so the request was refused before any I/O.

Functions

This section is empty.

Types

type Client

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

Client reads TinyGo's GitHub releases.

func New

func New() *Client

New returns a client for the public GitHub API.

func NewWithBaseURL

func NewWithBaseURL(baseURL string) *Client

NewWithBaseURL reads the release listing from baseURL+tag; tests point it at a local server.

func (*Client) Assets

func (c *Client) Assets(ctx context.Context, tag string) ([]ports.Asset, bool, error)

Assets lists the assets of the release tagged tag.

func (*Client) Read

func (c *Client) Read(ctx context.Context, url, name string) (ports.Archive, error)

Read downloads the archive at url and measures it as it streams: the SHA-256 of every byte, and of every regular file under tinygo/src. A .zip has no streaming form, so it passes through a temporary file that is removed after.

Jump to

Keyboard shortcuts

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