From 33025db68a442b1beb2042dfb02dd9ea937be5ec Mon Sep 17 00:00:00 2001 From: ramin Date: Mon, 18 Mar 2024 22:12:35 +0000 Subject: [PATCH] update README formatting --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 69026d5..9f469a9 100644 --- a/README.md +++ b/README.md @@ -55,24 +55,24 @@ It is possible to listen for a handful of events that the node emits. This is do To open a channel and watch for events ```go - client = client.WithBaseURL("http://localhost:8282") // if you are using polar for a local setup - - channel, err := client.Subscribe() - if err != nil { - panic(err) - return - } - - // example fo handling events - for message := range channel { - switch message.Type { - case eclair.ChannelOpened: - // handle channel opened event - case eclair.ChannelClosed: - // handle channel closed event - case eclair.PaymentReceived - // handle channel closed event - //...etc for all/any message type - } - } +client = client.WithBaseURL("http://localhost:8282") // if you are using polar for a local setup + +channel, err := client.Subscribe() +if err != nil { + panic(err) + return +} + +// example fo handling events +for message := range channel { + switch message.Type { + case eclair.ChannelOpened: + // handle channel opened event + case eclair.ChannelClosed: + // handle channel closed event + case eclair.PaymentReceived + // handle channel closed event + //...etc for all/any message type + } +} ```