Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 312 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 312 Bytes

golang-ip

This is a simple Golang package to access an IP address from an http.Request struct.

Example

package main

import (
	"fmt"
	"net/http"

	ip "github.com/theTardigrade/golang-ip"
)

func main() {
	r := &http.Request{
		RemoteAddr: "192.158.1.38:80",
	}

	fmt.Println(ip.Get(r))
}