mirror of https://github.com/fluffle/goirc
Syntax highlighting for source code in README.md
Markdown knows about golang, so use the source (formatting) luke
This commit is contained in:
parent
6277eb6e2d
commit
0b121522bb
13
README.md
13
README.md
|
@ -15,17 +15,17 @@ old `go1` API.
|
||||||
### Using the framework
|
### Using the framework
|
||||||
|
|
||||||
Synopsis:
|
Synopsis:
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
package main
|
import (
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
irc "github.com/fluffle/goirc/client"
|
irc "github.com/fluffle/goirc/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Creating a simple IRC client is simple.
|
// Creating a simple IRC client is simple.
|
||||||
c := irc.SimpleClient("nick")
|
c := irc.SimpleClient("nick")
|
||||||
|
|
||||||
|
@ -61,7 +61,8 @@ Synopsis:
|
||||||
|
|
||||||
// Wait for disconnect
|
// Wait for disconnect
|
||||||
<-quit
|
<-quit
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
The test client provides a good (if basic) example of how to use the framework.
|
The test client provides a good (if basic) example of how to use the framework.
|
||||||
Reading `client/handlers.go` gives a more in-depth look at how handlers can be
|
Reading `client/handlers.go` gives a more in-depth look at how handlers can be
|
||||||
|
|
Loading…
Reference in New Issue