libstring

package
v8.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package libstring provides various string related functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalizeIP

func CanonicalizeIP(ip string) string

CanonicalizeIP returns a form of ip suitable for comparison to other IPs. For IPv4 addresses, this is simply the whole string. For IPv6 addresses, this is the /64 prefix.

func RemoteIPFromIPLookup

func RemoteIPFromIPLookup(ipLookup limiter.IPLookup, r *http.Request) string

RemoteIPFromIPLookup picks an ip address explicitly from limiter.IPLookup criteria. This function is intended to replace RemoteIP function.

func StringInSlice

func StringInSlice(sliceString []string, needle string) bool

StringInSlice finds needle in a slice of strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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