corvus-ch / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
236 stars 36 forks source link

Fix Apply method has pointer receiver #88

Open Arkiant opened 3 years ago

Arkiant commented 3 years ago

The execution of the code fails because of this error:

~ > docker run --rm golang go get github.com/corvus-ch/rabbitmq-cli-consumer
# github.com/corvus-ch/rabbitmq-cli-consumer
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:37:16: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
    cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:40:3: unknown field 'EnvVar' in struct literal of type cli.StringFlag
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:42:16: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
    cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:46:16: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
    cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:50:14: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
    cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:54:14: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
    cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:58:14: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
    cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:62:14: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
    cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:66:14: cannot use cli.BoolFlag literal (type cli.BoolFlag) as type cli.Flag in slice literal:
    cli.BoolFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:70:16: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
    cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
src/github.com/corvus-ch/rabbitmq-cli-consumer/main.go:70:16: too many errors

This PR fix the error and closes #86.