github.com/lbryio/lbcd@v0.22.119/rpcclient/examples/customcommand/README.md (about)

     1  Custom Command Example
     2  ======================
     3  
     4  This example shows how to use custom commands with the rpcclient package, by
     5  implementing the `name_show` command from Namecoin Core.
     6  
     7  ## Running the Example
     8  
     9  The first step is to use `go get` to download and install the rpcclient package:
    10  
    11  ```bash
    12  $ go get github.com/lbryio/lbcd/rpcclient
    13  ```
    14  
    15  Next, modify the `main.go` source to specify the correct RPC username and
    16  password for the RPC server of your Namecoin Core node:
    17  
    18  ```Go
    19  	User: "yourrpcuser",
    20  	Pass: "yourrpcpass",
    21  ```
    22  
    23  Finally, navigate to the example's directory and run it with:
    24  
    25  ```bash
    26  $ cd $GOPATH/src/github.com/lbryio/lbcd/rpcclient/examples/customcommand
    27  $ go run *.go
    28  ```
    29  
    30  ## License
    31  
    32  This example is licensed under the [copyfree](http://copyfree.org) ISC License.