download

package
v0.0.0-...-898e51a Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAndUnzip

func DownloadAndUnzip(url, outputDir string) error

DownloadAndUnzip downloads and unzips the file

func EnumerateAndRemoveZIPFiles

func EnumerateAndRemoveZIPFiles(dir string) error

EnumerateAndRemoveZIPFiles enumerates and removes .zip files in the directory

func FetchAndParseJSON

func FetchAndParseJSON(url string, filePath string) ([]types.Item, error)

FetchAndParseJSON fetches and parses JSON data from the specified URL

func ParallelCheckAndRemoveEmptyTXTFiles

func ParallelCheckAndRemoveEmptyTXTFiles(dir string) error

ParallelCheckAndRemoveEmptyTXTFiles checks and removes empty .txt files in parallel

func ParallelMergeURLFiles

func ParallelMergeURLFiles(dir, outputFile string) error

ParallelMergeURLFiles merges URL files in parallel

Types

type Item

type Item struct {
	Name        string    `json:"name"`
	ProgramURL  string    `json:"program_url"`
	URL         string    `json:"URL"`
	Count       int       `json:"count"`
	Change      int       `json:"change"`
	IsNew       bool      `json:"is_new"`
	Platform    string    `json:"platform"`
	Bounty      bool      `json:"bounty"`
	LastUpdated time.Time `json:"last_updated"`
}

Item represents the structure of each object in the JSON array

Jump to

Keyboard shortcuts

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