Skip to content

Commit

Permalink
Merge pull request #3 from hassansin/update-to-go-modules
Browse files Browse the repository at this point in the history
Upgrade to use go modules
  • Loading branch information
hassansin authored Dec 6, 2021
2 parents 2bdb8fe + 3c48c8e commit 61df808
Show file tree
Hide file tree
Showing 366 changed files with 618 additions and 91,560 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ Download [Precompiled binaries](https://github.com/hassansin/amqptools/releases)

or install using go binary:


```
go get -u github.com/hassansin/amqptools
go install github.com/hassansin/amqptools@latest
```

## Usage
Expand All @@ -19,10 +18,8 @@ Consumes messages

### Synopsis


Consume messages

By default, it runs forever and waits for any new message in thequeue. Pass `--number` to consume certain number of messages and quit
By default, it runs forever and waits for any new message in thequeue. Pass '--number' to consume certain number of messages and quit

Use comma-separated values for binding the same queue with multiple routing keys:

Expand All @@ -49,6 +46,7 @@ amqptools consume [flags]
-v, --vhost string specify vhost (default "/")
-u, --username string specify username (default "guest")
-p, --password string specify password (default "guest")
-S, --ssl use amqps
-e, --exchange string exchange name (default "")
-k, --key string routing key (default "")
-t, --type string exchange type (default "direct")
Expand All @@ -62,20 +60,23 @@ amqptools consume [flags]
-h, --help help for consume
```

### SEE ALSO

* [amqptools](#amqptools) - Consume or publish messages

## amqptools publish

Publishes a message

### Synopsis

Publish a message using exchange and routing key.

If an argument is passed, that is used as message. Otherwise message is read from STDIN
mesage can be string or stdin:

echo 'hello world' | amqptools publish --exchange=logs --key=info

To pass headers and properites, use '--headers' & '--properties' any number of times in 'key:value' format

To pass headers and properites, use `--headers` & `--properties` any number of times in `key:value` format


```
Expand All @@ -98,6 +99,7 @@ amqptools publish [flags] [message]
-v, --vhost string specify vhost (default "/")
-u, --username string specify username (default "guest")
-p, --password string specify password (default "guest")
-S, --ssl use amqps
-e, --exchange string exchange name (default "")
-k, --key string routing key (default "")
-t, --type string exchange type (default "direct")
Expand All @@ -107,3 +109,7 @@ amqptools publish [flags] [message]
-h, --help help for publish
```

### SEE ALSO

* [amqptools](#amqptools) - Consume or publish messages

6 changes: 5 additions & 1 deletion cmd/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ var docCmd = &cobra.Command{
## Installing
Download [Precompiled binaries](https://github.com/hassansin/amqptools/releases) for supported operating systems.
or install using go binary:
` + "```" + `
go get -u github.com/hassansin/amqptools
go install github.com/hassansin/amqptools@latest
` + "```" + `
## Usage
Expand Down
18 changes: 18 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module github.com/hassansin/amqptools

go 1.17

require (
github.com/oleiade/reflections v1.0.1
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/streadway/amqp v1.0.0
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
581 changes: 581 additions & 0 deletions go.sum

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions vendor.yml

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/cpuguy83/go-md2man/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/github.com/cpuguy83/go-md2man/LICENSE.md

This file was deleted.

18 changes: 0 additions & 18 deletions vendor/github.com/cpuguy83/go-md2man/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions vendor/github.com/cpuguy83/go-md2man/go-md2man.1.md

This file was deleted.

51 changes: 0 additions & 51 deletions vendor/github.com/cpuguy83/go-md2man/md2man.go

This file was deleted.

19 changes: 0 additions & 19 deletions vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go

This file was deleted.

Loading

0 comments on commit 61df808

Please sign in to comment.