Documentation
¶
Index ¶
- Constants
- func DownloadFile(filename, url string) error
- func DownloadFileWithVersion(name, version string)
- func GenerateLink(lib, ver, file string) string
- func PackageTagWithVersion(name, version string) []string
- func PackageURLWithVersion(name, version string) []string
- func Version() string
- type Assets
- type Package
- type Repositories
- type SearchPackage
- type SearchResults
Constants ¶
View Source
const CDNJS_AJAX_URL = "http://cdnjs.cloudflare.com/ajax/libs"
View Source
const CDNJS_API_URL = "https://api.cdnjs.com/libraries"
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
DownloadFile - download one file to current folder
func DownloadFileWithVersion ¶
func DownloadFileWithVersion(name, version string)
DownloadFileWithVersion - download the files with specific version, latest version default
func GenerateLink ¶
GenerateLink - Generate download link of the lib
func PackageTagWithVersion ¶
PackageTagWithVersion - get lib tag with specific version , latest version default
func PackageURLWithVersion ¶
PackageURLWithVersion - get the urls with specific version, latest version default
Types ¶
type Package ¶
type Package struct { Name string FileName string Version string Description string Homepage string Keywords []string Licence string Repositories []Repositories Assets []Assets }
func (Package) PrintAsJSON ¶
func (p Package) PrintAsJSON()
type Repositories ¶
type SearchPackage ¶
type SearchResults ¶
type SearchResults struct {
Results []SearchPackage `json:"results"`
}
func SearchWithName ¶
func SearchWithName(name string) SearchResults
SearchWithName - search libs with lib names
func (SearchResults) PrintAsTable ¶
func (sr SearchResults) PrintAsTable(num int)
Click to show internal directories.
Click to hide internal directories.