FILE / ScuroNeko/mtg

ipblocklist/files/init.go

Исходный файл и его история в репозитории.
FILE d98d5be3a7d8e0c39c3e6d4dea1ba1ad008f286b
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
}