internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(url, path string) error

Download downloads a file from a given URL to a specified path and shows progress.

func MergeZips

func MergeZips(baseZipPath, overlayZipPath, outputZipPath string) error

MergeZips combines two zip archives. It overlays the files from overlayZipPath on top of baseZipPath. If a file exists in both archives, the one from overlayZipPath is used in the final outputZipPath.

Types

type ProgressWriter

type ProgressWriter struct {
	ProgressChan chan int
}

ProgressWriter implements io.Writer to track download progress. It sends the number of bytes written to a channel.

func (*ProgressWriter) Write

func (pw *ProgressWriter) Write(p []byte) (int, error)

Write implements the io.Writer interface. It writes the byte slice p and sends the number of bytes written to the ProgressChan.

Jump to

Keyboard shortcuts

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