goreleases

package
v0.0.0-...-d168c4f Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

goreleases is a wrapper for getting the current Go releases from https://go.dev/dl/?mode=json

Index

Constants

View Source
const (
	ReleaseEndpoint = "https://go.dev/dl/?mode=json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Filename string `json:"filename"`
	OS       string `json:"os"`
	Arch     string `json:"arch"`
	Version  string `json:"version"`
	SHA256   string `json:"sha256"`
	Size     int    `json:"size"`
	Kind     string `json:"kind"`
}

type Release

type Release struct {
	Version string `json:"version"`
	Stable  bool   `json:"stable"`
	Files   []File `json:"files"`
}

func Releases

func Releases(client *http.Client, ctx context.Context, endpoint string, all bool) ([]Release, error)

Releases returns a list of available Go releases from the Go Website. Releases are sorted newest first.