Move errors to gemini.go
This commit is contained in:
parent
2c1081966d
commit
4189a4f717
@ -4,21 +4,12 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"errors"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client errors.
|
|
||||||
var (
|
|
||||||
ErrInvalidURL = errors.New("gemini: invalid URL")
|
|
||||||
ErrInvalidResponse = errors.New("gemini: invalid response")
|
|
||||||
ErrCertificateUnknown = errors.New("gemini: unknown certificate")
|
|
||||||
ErrCertificateNotTrusted = errors.New("gemini: certificate is not trusted")
|
|
||||||
)
|
|
||||||
|
|
||||||
// Request represents a Gemini request.
|
// Request represents a Gemini request.
|
||||||
type Request struct {
|
type Request struct {
|
||||||
// URL specifies the URL being requested.
|
// URL specifies the URL being requested.
|
||||||
|
|||||||