Skip to content

Commit

Permalink
Remove irc.Dial and irc.DialTLS
Browse files Browse the repository at this point in the history
  • Loading branch information
belak committed Sep 23, 2015
1 parent eff5cb0 commit 5a59307
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ package irc

import (
"bufio"
"crypto/tls"
"errors"
"fmt"
"io"
"net"
"strconv"
"strings"
"time"
Expand All @@ -23,28 +21,6 @@ type Client struct {
in *bufio.Reader
}

// Dial connects to the given address and creates a new Client using
// the TCP connection as a transport.
func Dial(addr string, nick, user, name, pass string) (*Client, error) {
conn, err := net.Dial("tcp", addr)
if err != nil {
return nil, err
}

return NewClient(conn, nick, user, name, pass), nil
}

// DialTLS connects to the given address and creates a new Client
// using the TLS connection as a transport.
func DialTLS(addr string, c *tls.Config, nick, user, name, pass string) (*Client, error) {
conn, err := tls.Dial("tcp", addr, c)
if err != nil {
return nil, err
}

return NewClient(conn, nick, user, name, pass), nil
}

// NewClient creates a new Client and sends the initial messages to
// set up nick, user, name and send a password if needed.
func NewClient(rwc io.ReadWriteCloser, nick, user, name, pass string) *Client {
Expand Down

0 comments on commit 5a59307

Please sign in to comment.