cli

package
v0.0.0-...-9c32a67 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBName

func DBName() (string, error)

DBName returns the name of the running executable combind with suffix .db

func ExecutableName

func ExecutableName() (string, error)

ExecutableName return the name of the running executable

func LogName

func LogName() (string, error)

LogName returns the name of the running executable combind with suffix .log

func OpenFreshDB

func OpenFreshDB() (*nodedb.Connection, error)

OpenFreshDB removes an existing '<executable name>.db' file and create a new one. It returns an open nodedb.Connection. Use defer conn.Close() to perform close and clean up when main function terminates.

func RemoveDB

func RemoveDB(dbname string) error

RemoveDB deletes the file with the provided file name

func StartLogFile

func StartLogFile() (*os.File, error)

StartLogFile opens (or creates) a log file name after the running executable

func StartTimer

func StartTimer(name string) func()

StartTimer provides a quick and easy timer, just pass a name and call the returned function when done to stop the timer

Types

This section is empty.

Jump to

Keyboard shortcuts

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