sourceforge

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix = "sourceforge:"

Variables

This section is empty.

Functions

func IsTarget

func IsTarget(value string) bool

func SetVerbose

func SetVerbose(enabled bool, writer io.Writer)

func VerboseEnabledForTest

func VerboseEnabledForTest() bool

func VersionFromText

func VersionFromText(text string) string

Types

type File

type File struct {
	Name         string   `json:"name"`
	Path         string   `json:"path"`
	DownloadURL  string   `json:"download_url"`
	URL          string   `json:"url"`
	FullPath     string   `json:"full_path"`
	Type         FileType `json:"type"`
	Downloadable bool     `json:"downloadable"`
}

func LatestVersionFile

func LatestVersionFile(files []File) (File, bool)

func ParseFilesPage

func ParseFilesPage(body []byte) ([]File, error)

type FileType

type FileType string
const (
	TypeFile      FileType = "f"
	TypeDirectory FileType = "d"
)

type Finder

type Finder struct {
	Project string
	Path    string
	Tag     string
	Getter  HTTPGetter
}

func (Finder) Find

func (f Finder) Find() ([]string, error)

type HTTPGetter

type HTTPGetter interface {
	Get(url string) (*http.Response, error)
}

type LatestInfo

type LatestInfo struct {
	Version string
	Path    string
}

func LatestVersion

func LatestVersion(project, sourcePath string, getter HTTPGetter) (LatestInfo, error)

type Target

type Target struct {
	Project    string
	Path       string
	Normalized string
}

func ParseTarget

func ParseTarget(value string) (Target, error)

Jump to

Keyboard shortcuts

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