common

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package common outlines common helper methods and types.

Package common outlines common helper methods and types.

Index

Constants

This section is empty.

Variables

View Source
var (
	// DataDir is the global data directory definition.
	DataDir = getDataDir()

	// DBDir is the global db directory definition.
	DBDir = filepath.FromSlash(fmt.Sprintf("%s/db", DataDir))

	// LogsDir is the global logs directory definition.
	LogsDir = filepath.FromSlash(fmt.Sprintf("%s/logs", DataDir))
)

Functions

func CreateDirIfDoesNotExit

func CreateDirIfDoesNotExit(dir string) error

CreateDirIfDoesNotExit creates a given directory if it does not already exist.

func GetCtxValue

func GetCtxValue(ctx *fasthttp.RequestCtx, key string) []byte

GetCtxValue fetches the value at a given key in a fasthttp context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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