util

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package util contains utility functions used by the download and create packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) bool

FileExists returns true if the specified file exists

func FindCentralDirectory added in v1.3.1

func FindCentralDirectory(filename string) int64

FindCentralDirectory returns the offset of the zip file's central directory. If not found, returns -1

func IsGoodZipFile

func IsGoodZipFile(filename string) bool

IsGoodZipFile returns true of the specified file is a valid zip file

Types

type Progress

type Progress struct {
	Total       int64
	SoFar       int64
	LastPercent int
}

Progress is a custom writer that tracks the progress of a long-running operation.

func NewProgress

func NewProgress() *Progress

Jump to

Keyboard shortcuts

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