Move errors to gemini.go

This commit is contained in:
adnano 2020-10-13 20:10:04 -04:00
parent 2c1081966d
commit 4189a4f717
4 changed files with 13 additions and 23 deletions

View File

@ -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.

6
fs.go
View File

@ -1,7 +1,6 @@
package gmi package gmi
import ( import (
"errors"
"io" "io"
"mime" "mime"
"os" "os"