util

package
v2.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Overview

Package util contains various general utility functions used throughout the project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashBuffer

func HashBuffer(buf []byte) string

HashBuffer computes a base64 MD5 hash from a buffer

func IDToString

func IDToString(id int64) string

IDToString is a helper for converting a post ID to a string for JSON keys

func Waterfall

func Waterfall(fns []func() error) (err error)

Waterfall executes a slice of functions until the first error returned. This error, if any, is returned to the caller.

func WrapError

func WrapError(text string, err error) error

WrapError wraps error types to create compound error chains

Types

This section is empty.

Jump to

Keyboard shortcuts

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