<commit_before>// Package nntpclient provides an NNTP Client.
package nntpclient

import (
	"errors"
	"io"
	"net/textproto"
	"strconv"
	"strings"

	"github.com/dustin/go-nntp"
)

// Client is an NNTP client.
type Client struct {
	conn   *textproto.Conn
	Banner string
}

// New connects a client to an NNTP server.
func New(net, addr string) (*Client, error) {
	conn, err := textproto.Dial(net, addr)
	if err != nil {
		return nil, err
	}

	_, msg, err := conn.ReadCodeLine(200)
	if err != nil {
		return nil, err
	}

	return &Client{
		conn:   conn,
		Banner: msg,
	}, nil
}

// Authenticate against an NNTP server using authinfo user/pass
func (c *Client) Authenticate(user, pass string) (msg string, err error) {<commit_msg>Implemented client.Close()<commit_after>// Package nntpclient provides an NNTP Client.
package nntpclient

import (
	"errors"
	"io"
	"net/textproto"
	"strconv"
	"strings"

	"github.com/dustin/go-nntp"
)

// Client is an NNTP client.
type Client struct {
	conn   *textproto.Conn
	Banner string
}

// New connects a client to an NNTP server.
func New(net, addr string) (*Client, error) {
	conn, err := textproto.Dial(net, addr)
	if err != nil {
		return nil, err
	}

	_, msg, err := conn.ReadCodeLine(200)
	if err != nil {
		return nil, err
	}

	return &Client{
		conn:   conn,
		Banner: msg,
	}, nil
}

// Close this client.
func (c *Client) Close() error {
	return c.conn.Close()
}

// Authenticate against an NNTP server using authinfo user/pass
func (c *Client) Authenticate(user, pass string) (msg string, err error) {
{'fraction_non_alphanumeric': 0.12596899224806202, 'fraction_numerical': 0.003875968992248062, 'mean_word_length': 3.5160349854227406, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5583473', 'n_tokens_mistral': 597, 'n_tokens_neox': 574, 'n_words': 183}