From 51e6046a095c4da1bb44db85646799a82451a68e Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 25 Feb 2016 08:50:53 +0100 Subject: [PATCH] README: add SSLConfig to make connecting work Without an SSLConfig, I get the following error: ``` E0225 08:43:12.384793 28687 connection.go:406] irc.recv(): tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config ``` --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7936379..40fe72a 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Synopsis: package main import ( + "crypto/tls" "fmt" irc "github.com/fluffle/goirc/client" @@ -31,6 +32,7 @@ Synopsis: // Or, create a config and fiddle with it first: cfg := irc.NewConfig("nick") cfg.SSL = true + cfg.SSLConfig = &tls.Config{ServerName: "irc.freenode.net"} cfg.Server = "irc.freenode.net:7000" cfg.NewNick = func(n string) string { return n + "^" } c = irc.Client(cfg)