Fuck my life, why do I even do this to myself
This commit is contained in:
parent
3e84c23591
commit
bdab0cc18f
@ -231,7 +231,7 @@ func (c *cmd) Before(ctx *cli.Context) error {
|
|||||||
if len(ctx.String("broker")) > 0 {
|
if len(ctx.String("broker")) > 0 {
|
||||||
if b, ok := c.opts.Brokers[ctx.String("broker")]; ok {
|
if b, ok := c.opts.Brokers[ctx.String("broker")]; ok {
|
||||||
n := b(strings.Split(ctx.String("broker_address"), ","))
|
n := b(strings.Split(ctx.String("broker_address"), ","))
|
||||||
c.opts.Broker = &n
|
*c.opts.Broker = n
|
||||||
} else {
|
} else {
|
||||||
return fmt.Errorf("Broker %s not found", ctx.String("broker"))
|
return fmt.Errorf("Broker %s not found", ctx.String("broker"))
|
||||||
}
|
}
|
||||||
@ -245,7 +245,7 @@ func (c *cmd) Before(ctx *cli.Context) error {
|
|||||||
if len(ctx.String("registry")) > 0 {
|
if len(ctx.String("registry")) > 0 {
|
||||||
if r, ok := c.opts.Registries[ctx.String("registry")]; ok {
|
if r, ok := c.opts.Registries[ctx.String("registry")]; ok {
|
||||||
n := r(strings.Split(ctx.String("registry_address"), ","))
|
n := r(strings.Split(ctx.String("registry_address"), ","))
|
||||||
c.opts.Registry = &n
|
*c.opts.Registry = n
|
||||||
} else {
|
} else {
|
||||||
return fmt.Errorf("Registry %s not found", ctx.String("registry"))
|
return fmt.Errorf("Registry %s not found", ctx.String("registry"))
|
||||||
}
|
}
|
||||||
@ -261,7 +261,7 @@ func (c *cmd) Before(ctx *cli.Context) error {
|
|||||||
if len(ctx.String("selector")) > 0 {
|
if len(ctx.String("selector")) > 0 {
|
||||||
if s, ok := c.opts.Selectors[ctx.String("selector")]; ok {
|
if s, ok := c.opts.Selectors[ctx.String("selector")]; ok {
|
||||||
n := s(selector.Registry(*c.opts.Registry))
|
n := s(selector.Registry(*c.opts.Registry))
|
||||||
c.opts.Selector = &n
|
*c.opts.Selector = n
|
||||||
} else {
|
} else {
|
||||||
return fmt.Errorf("Selector %s not found", ctx.String("selector"))
|
return fmt.Errorf("Selector %s not found", ctx.String("selector"))
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ func (c *cmd) Before(ctx *cli.Context) error {
|
|||||||
if len(ctx.String("transport")) > 0 {
|
if len(ctx.String("transport")) > 0 {
|
||||||
if t, ok := c.opts.Transports[ctx.String("transport")]; ok {
|
if t, ok := c.opts.Transports[ctx.String("transport")]; ok {
|
||||||
n := t(strings.Split(ctx.String("transport_address"), ","))
|
n := t(strings.Split(ctx.String("transport_address"), ","))
|
||||||
c.opts.Transport = &n
|
*c.opts.Transport = n
|
||||||
} else {
|
} else {
|
||||||
return fmt.Errorf("Transport %s not found", ctx.String("transport"))
|
return fmt.Errorf("Transport %s not found", ctx.String("transport"))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user