libstring

package
v7.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 3 Imported by: 6

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 RemoteIP

func RemoteIP(ipLookups []string, forwardedForIndexFromBehind int, r *http.Request) string

RemoteIP finds IP Address given http.Request struct.

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