stock

package module
v0.0.0-...-93c0ed4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

README

stock

Common go utilities/functionalities for various projects.

usage

import "voidedtech.com/stock"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Die

func Die(message string, err error)

Die will print messages and exit.

func LogError

func LogError(message string, err error)

LogError will log an error to stderr.

func NewBasicCategoryError

func NewBasicCategoryError(category, message string) error

NewBasicCategoryError creates a category-based message.

func NewBasicError

func NewBasicError(message string) error

NewBasicError creates a non-category error.

func PathExists

func PathExists(path string) bool

PathExists indicates if a path exists.

func Stdin

func Stdin(one bool) ([]byte, error)

Stdin reads one (or more) lines from stdin.

Types

type BasicError

type BasicError struct {
	// contains filtered or unexported fields
}

BasicError is a simple category/message error type.

func (*BasicError) Error

func (err *BasicError) Error() string

Error gets the error message for a basic error.

Source Files

  • common.go

Jump to

Keyboard shortcuts

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