util

package
v0.0.0-...-dc37515 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePlaceholders

func GeneratePlaceholders(start, length int) string

GeneratePlaceholders generates placeholders for an SQL query.

func RandomHexString

func RandomHexString(length int) string

RandomHexString returns a random hex string with a given string length.

func SetContext

func SetContext(r *http.Request, key, value interface{}) *http.Request

SetContext sets a value in a request's context.

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase converts camel case to snake case.

Types

type Filter

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

Filter represents a generic markdown filter.

func NewFilter

func NewFilter(logger logrus.FieldLogger) *Filter

NewFilter creates a filter with a logger.

func (*Filter) Filter

func (f *Filter) Filter(input string) string

Filter converts markdown to safe HTML.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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