8

Add examples section to `ockam message send` command's help · Issue #3257 · buil...

 2 years ago
source link: https://github.com/build-trust/ockam/issues/3257
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Current Behaviour

ockam message send --help

does not display any examples

Desired Behaviour

As part of the help show the following examples section:

EXAMPLES

    # Create two nodes
    > ockam node create n1
    > ockam node create n2

    # Send a message to the uppercase service on node n1
    > ockam message send hello --to /node/n1/service/uppercase
    HELLO

    # Send a message to the uppercase service on node n1 from node n1
    > ockam message send hello --from /node/n2 --to /node/n1/service/uppercase
    HELLO

    # Create a secure channel from node n1 to the api service on node n1
    # Send a message through this encrypted channel to the uppercase service
    > ockam secure-channel create --from /node/n1 --to /node/n2/service/api \
        | ockam message send hello --from /node/n1 --to -/service/uppercase
    HELLO

LEARN MORE

References

Here's an example of command that currently shows examples

ockam node create --help

Here's the code for the ockam node create command

Here's the code for the ockam message send command
https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/message/send.rs


We love helping new contributors!
If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion.
If you're looking for other issues to contribute to, checkout this discussion and labels - good first issue or help wanted


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK