uhelpers

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 5 Imported by: 0

README

go-uhelpers

Package uhelpers (micro helpers) provides very tiny and simple helpers functions

Examples

package main

import (
	"fmt"
	uh "github.com/borislassort/go-uhelpers"
)

func main() {
	// Download
	err := uh.DownloadFile("file.zip", "https://the.u.r.l/file.zip")
	if err != nil {
		fmt.Println(err)
	}

	err := uh.Unzip("file.zip", "dir/")
	if err != nil {
		fmt.Println(err)
	}
}

Documentation

Overview

Package uhelpers (micro helpers) provides very tiny and simple helpers functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(outfilePath string, url string) error

DownloadFile download a file from a direct URL

func Unzip

func Unzip(zipPath string, dirPath string) error

Unzip extract zip archive to a directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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