util

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCertificate added in v0.2.0

func LoadCertificate(keyFile, certFile, domain string) (tls.Certificate, error)

LoadCertificate loads a certificate given a private key and certificate PEM files. Only in case the associated domain is localhost and no files are specified a self signed certificate will be automatically generated.

func RandomBytes

func RandomBytes(len int) []byte

RandomBytes generates a random bytes slice of length 'len'.

func SplitKeyAndValue

func SplitKeyAndValue(str string, sep byte) (key string, value string)

SplitKeyAndValue splits a string between 'key' and 'value' sub elements.

Types

This section is empty.

Jump to

Keyboard shortcuts

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