helpers

package
v0.0.0-...-9fd0697 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPAcceptCheck

func HTTPAcceptCheck(acceptable string, value http.Header) bool

HTTPAcceptCheck takes in the HTTP request Accept header and returns boolean if the requested mime-type is found TODO support `text/*`? or wait for GO to implement this check since parsing/ processing this header is at least a couple of RFCs

func IPNetArrayContainsIP

func IPNetArrayContainsIP(arr []*net.IPNet, ip net.IP) bool

IPNetArrayContainsIP checks if an array of *net.IPNet contains the given net.IP, returns bool

func IsValidUUID

func IsValidUUID(uuid string) (isValid bool)

IsValidUUID checks if given string is a valid Version 4 UUID.

func StringArrayToIPNet

func StringArrayToIPNet(s []string) (nets []*net.IPNet, err error)

StringArrayToIPNet parses an array of string using ParseCIDR, returns array of *net.IPNet and error

Types

This section is empty.

Jump to

Keyboard shortcuts

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