package fasthttp

import (
	
)

type userDataKV struct {
	key   interface{}
	value interface{}
}

type userData []userDataKV

func ( *userData) ( interface{},  interface{}) {
	if ,  := .([]byte);  {
		 = string()
	}
	 := *
	 := len()
	for  := 0;  < ; ++ {
		 := &[]
		if .key ==  {
			.value = 
			return
		}
	}

	if  == nil {
		return
	}

	 := cap()
	if  >  {
		 = [:+1]
		 := &[]
		.key = 
		.value = 
		* = 
		return
	}

	 := userDataKV{}
	.key = 
	.value = 
	 = append(, )
	* = 
}

func ( *userData) ( []byte,  interface{}) {
	.Set(, )
}

func ( *userData) ( interface{}) interface{} {
	if ,  := .([]byte);  {
		 = b2s()
	}
	 := *
	 := len()
	for  := 0;  < ; ++ {
		 := &[]
		if .key ==  {
			return .value
		}
	}
	return nil
}

func ( *userData) ( []byte) interface{} {
	return .Get()
}

func ( *userData) () {
	 := *
	 := len()
	for  := 0;  < ; ++ {
		 := [].value
		if ,  := .(io.Closer);  {
			.Close()
		}
	}
	* = (*)[:0]
}

func ( *userData) ( interface{}) {
	if ,  := .([]byte);  {
		 = b2s()
	}
	 := *
	 := len()
	for  := 0;  < ; ++ {
		 := &[]
		if .key ==  {
			--
			[], [] = [], []
			[].value = nil
			 = [:]
			* = 
			return
		}
	}
}

func ( *userData) ( []byte) {
	.Remove()
}