func WithProtocol(options interface{}, protocol string) (map[string]interface{}, error) {
	buf := new(bytes.Buffer)
	encoder := toml.NewEncoder(buf)
	encoder.Indent = ""
	if err := encoder.Encode(options); err != nil {
		return nil, err
	}

	res := make(map[string]interface{})

	if _, err := toml.Decode(buf.String(), &res); err != nil {
		return nil, err
	}

	res["protocol"] = protocol

	return res, nil
}
func WithProtocol(options interface{}, protocol string) (map[string]interface{}, error) {
	buf := new(bytes.Buffer)
	encoder := toml.NewEncoder(buf)
	encoder.Indent = ""
	if err := encoder.Encode(options); err != nil {
		return nil, err
	}

	res := make(map[string]interface{})

	if _, err := toml.Decode(buf.String(), &res); err != nil {
		return nil, err
	}

	res["protocol"] = protocol

	return res, nil
}
func WithProtocol ( options interface { } , protocol string ) ( map [ string ] interface { } , error ) { buf := new ( bytes . Buffer ) encoder := toml . NewEncoder ( buf ) encoder . Indent = " " if err := encoder . Encode ( options ) ; err != nil { return nil , err } res := make ( map [ string ] interface { } ) if _ , err := toml . Decode ( buf . String ( ) , & res ) ; err != nil { return nil , err } res [ " " ] = protocol return res , nil }
// WithProtocol marshal options to toml, unmarshal to map[string]interface{} and add "protocol" key to them
WithProtocol marshal options to toml unmarshal to map [ string ] interface {} and add protocol key to them