@@ -350,19 +350,11 @@ const (
350350 Headers TExchangeType = "headers"
351351)
352352
353- type ExchangeType struct {
354- Type TExchangeType
355- }
356-
357- func (e ExchangeType ) String () string {
358- return string (e .Type )
359- }
360-
361353// IExchangeSpecification represents the specification of an exchange
362354type IExchangeSpecification interface {
363355 name () string
364356 isAutoDelete () bool
365- exchangeType () ExchangeType
357+ exchangeType () TExchangeType
366358 arguments () map [string ]any
367359}
368360
@@ -380,8 +372,8 @@ func (d *DirectExchangeSpecification) isAutoDelete() bool {
380372 return d .IsAutoDelete
381373}
382374
383- func (d * DirectExchangeSpecification ) exchangeType () ExchangeType {
384- return ExchangeType { Type : Direct }
375+ func (d * DirectExchangeSpecification ) exchangeType () TExchangeType {
376+ return Direct
385377}
386378
387379func (d * DirectExchangeSpecification ) arguments () map [string ]any {
@@ -402,8 +394,8 @@ func (t *TopicExchangeSpecification) isAutoDelete() bool {
402394 return t .IsAutoDelete
403395}
404396
405- func (t * TopicExchangeSpecification ) exchangeType () ExchangeType {
406- return ExchangeType { Type : Topic }
397+ func (t * TopicExchangeSpecification ) exchangeType () TExchangeType {
398+ return Topic
407399}
408400
409401func (t * TopicExchangeSpecification ) arguments () map [string ]any {
@@ -424,8 +416,8 @@ func (f *FanOutExchangeSpecification) isAutoDelete() bool {
424416 return f .IsAutoDelete
425417}
426418
427- func (f * FanOutExchangeSpecification ) exchangeType () ExchangeType {
428- return ExchangeType { Type : FanOut }
419+ func (f * FanOutExchangeSpecification ) exchangeType () TExchangeType {
420+ return FanOut
429421}
430422
431423func (f * FanOutExchangeSpecification ) arguments () map [string ]any {
@@ -446,8 +438,8 @@ func (h *HeadersExchangeSpecification) isAutoDelete() bool {
446438 return h .IsAutoDelete
447439}
448440
449- func (h * HeadersExchangeSpecification ) exchangeType () ExchangeType {
450- return ExchangeType { Type : Headers }
441+ func (h * HeadersExchangeSpecification ) exchangeType () TExchangeType {
442+ return Headers
451443}
452444
453445func (h * HeadersExchangeSpecification ) arguments () map [string ]any {
@@ -469,8 +461,8 @@ func (c *CustomExchangeSpecification) isAutoDelete() bool {
469461 return c .IsAutoDelete
470462}
471463
472- func (c * CustomExchangeSpecification ) exchangeType () ExchangeType {
473- return ExchangeType { Type : TExchangeType (c .ExchangeTypeName )}
464+ func (c * CustomExchangeSpecification ) exchangeType () TExchangeType {
465+ return TExchangeType (c .ExchangeTypeName )
474466}
475467
476468func (c * CustomExchangeSpecification ) arguments () map [string ]any {
0 commit comments