request

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TypstPackageEndpoint string = "https://api.github.com/repos/typst/packages/contents/packages/preview/"

Variables

View Source
var ErrInvalidValidation = errors.New("invalid validation")

Functions

func GetLatestVersion

func GetLatestVersion(versions []*ResponseModel) (string, error)

func ValidateVersion

func ValidateVersion(resp ResponseModel) (bool, error)

Validate that a given response from the github api of the typst package repository only contains valid semver strings.

Types

type ResponseModel

type ResponseModel struct {
	Name string `json:"name" validate:"semver"`
}

func FetchDataFromGitHub

func FetchDataFromGitHub(url string, ctx context.Context) ([]*ResponseModel, error)

Jump to

Keyboard shortcuts

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