internal

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package internal provides additional utility functions that are needed in elPrep.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolHash

func BoolHash(b bool) uint64

BoolHash returns a hash value for the given boolean value.

func Directory

func Directory(file string) (files []string, err error)

Directory returns a slice of filenames. If the given filename refers to a directory, return a slice of names of files that are in this directory. If the given filename does not refer to a directory, return a slice with this filename as the only entry.

func FullPathname

func FullPathname(filename string) (string, error)

FullPathname returns the given filename if it is absolute. Otherwise, it joins it with the current working directory.

func ReleaseByteBuffer

func ReleaseByteBuffer(buf *[]byte)

ReleaseByteBuffer returns the given slice of bytes to the internal sync.Pool from which ReserveByteBuffer can fetch it again.

func ReserveByteBuffer

func ReserveByteBuffer() *[]byte

ReserveByteBuffer uses a sync.Pool to either reuse or make a slice of bytes of length 0, but of capacity potentially larger than 0.

Use ReleaseByteBuffer to return slices of bytes to the internal pool.

func StringHash

func StringHash(s string) (hash uint64)

StringHash returns a hash value for the given string value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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