Skip to content

Commit

Permalink
docs: cleanup helloworld example
Browse files Browse the repository at this point in the history
  • Loading branch information
brectanus-sigsci committed Sep 23, 2019
1 parent e2828b4 commit 78e19ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ log.Fatal(s.ListenAndServe())
The [examples](examples/) directory contains complete example code.

To run the simple [helloworld](examples/helloworld/main.go) example:
```bash
```shell
# Run __without__ sigsci enabled
go run examples/helloworld/main.go localhost:8000
go run ./examples/helloworld localhost:8000
# Run with sigsci-agent listening via a UNIX Domain socket file
go run examples/helloworld/main.go localhost:8000 /var/run/sigsci.sock
go run ./examples/helloworld localhost:8000 /var/run/sigsci.sock
# Run with sigsci-agent listening via a TCP address:port
go run examples/helloworld/main.go localhost:8000 localhost:9999
go run ./examples/helloworld localhost:8000 localhost:9999
```

This will run a HTTP listener on `localhost:8000`, which will send any
Expand Down
4 changes: 2 additions & 2 deletions examples/helloworld/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
listenerAddress = "localhost:8000"
}

// Process sigsci-agent rpc-address if passed
// Process sigsci-agent rpc-address from the optional second arg
sigsciAgentNetwork := "unix"
sigsciAgentAddress := ""
if len(os.Args) > 2 {
Expand Down Expand Up @@ -56,7 +56,7 @@ func main() {
log.Fatal(err)
}

log.Printf("Using sigsci-agent address (pass address as program argument to change): %s:%s", sigsciAgentNetwork, sigsciAgentAddress)
log.Printf("Signal Sciences agent RPC address: %s:%s", sigsciAgentNetwork, sigsciAgentAddress)

// Use the wrapped sigsci handler
handler = wrapped
Expand Down

0 comments on commit 78e19ca

Please sign in to comment.