FILE / ScuroNeko/mtg

ipblocklist/files/init.go

Исходный файл и его история в репозитории.
FILE 60ab083defb21b78055e7ae8aeea6b4b39069759
Files
mtg/ipblocklist/files/init.go
T
2022-08-04 18:39:00 +03:00

22 lines
529 B
Go

package files
import (
"context"
"errors"
"io"
)
// ErrBadHTTPClient is returned if given HTTP client is initialized
// incorrectly.
var ErrBadHTTPClient = errors.New("incorrect http client")
// File is an abstraction for a entity that can be opened in some context.
type File interface {
// Open returns an readable entity for a file. It is important to not forget
// to close it after the usage.
Open(context.Context) (io.ReadCloser, error)
// String returns a short text description for the file
String() string
}