utils

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientIP

func GetClientIP(r *http.Request) (string, error)

GetClientIP retrieves the client IP from incoming requests

func ResolvePath

func ResolvePath(path string) (string, error)

ResolvePath converts relative local paths to absolute paths

func Skip

func Skip(source string, prefixes []string) bool

Skip evaluates whether a source endpoint contains any of the prefixes. i.e: /a/b/c/d/e contains prefix /a/b/c

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase converts a CamelCase string to a snake_case string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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