utils

package
v0.0.0-...-be9014a Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseLoggers

func CloseLoggers()

func Combine

func Combine(directory string, filename string) string

Combine directory and filename

func Count

func Count(folder string) (int, error)

Count utils method to count a directory structure

func ExistsInDatabase

func ExistsInDatabase(filename string, name string) (bool, error)

ExistsInDatabase check if a package's name already exists into the database file

func FileDownloader

func FileDownloader(url string, file string) error

FileDownloader method to download a file from an URI

func InsertIntoDatabase

func InsertIntoDatabase(filename string, key string, value string) error

InsertIntoDatabase insert a package's name into the database file

func Mkdir

func Mkdir(folder string) error

Mkdir utils method to create a directory structure

func NewLogger

func NewLogger(loggerInfo LoggerInfo) *log.Logger

Types

type LoggerInfo

type LoggerInfo struct {
	Directory string
	Filename  string
	Format    string
	Level     string
}

Jump to

Keyboard shortcuts

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