From 747f4fb70ff61d3f8a7bb1bed896a913b0999450 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sun, 19 May 2019 23:45:48 -0400 Subject: middleware func to attach remote ip to context --- types.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'types.go') diff --git a/types.go b/types.go index 8a707bd..b5f27ce 100644 --- a/types.go +++ b/types.go @@ -22,3 +22,8 @@ type Instance struct { Mail string Desc string } + +// ipCtxKey is the Context value key for user IP addresses +type ipCtxKey int + +const ctxKey ipCtxKey = iota -- cgit 1.4.1-2-gfad0