web_node

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultURL 默认镜像地址
	DefaultURL = "https://nodejs.org/dist/"
)

Variables

This section is empty.

Functions

func DownloadContent

func DownloadContent(url string) (content []byte, err error)

func GetAvailable

func GetAvailable() (all []string, lts []string, current []string, stable []string, unstable []string, npm map[string]string, err error)

GetAvailable Retrieve the remotely available versions

func GetMeta

func GetMeta() map[string]VersionNode

func IsUnstable

func IsUnstable(element FileData) bool

IsUnstable Identifies an unstable old version.

func SetProxy

func SetProxy(p string, verifyssl bool)

Types

type FileData

type FileData struct {
	Version  string   `json:"version"`
	Date     string   `json:"date"`
	Files    []string `json:"files"`
	Npm      string   `json:"npm,omitempty"`
	V8       string   `json:"v8"`
	Uv       string   `json:"uv,omitempty"`
	Zlib     string   `json:"zlib,omitempty"`
	Openssl  string   `json:"openssl,omitempty"`
	Modules  string   `json:"modules,omitempty"`
	Lts      any      `json:"lts"`
	Security bool     `json:"security"`
}

type VersionNode

type VersionNode struct {
	util.Version
}

func (*VersionNode) FindPackage

func (v *VersionNode) FindPackage(kind, goos, goarch string) (*util.Package, error)

FindPackage 返回指定操作系统和硬件架构的版本包

Jump to

Keyboard shortcuts

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