mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 13:14:02 +03:00
Add documentation for essentials
This commit is contained in:
+12
-1
@@ -1,15 +1,26 @@
|
||||
package essentials
|
||||
|
||||
import "net"
|
||||
import (
|
||||
"io"
|
||||
"net"
|
||||
)
|
||||
|
||||
// CloseableReader is a reader interface that can close its reading end.
|
||||
type CloseableReader interface {
|
||||
io.Reader
|
||||
|
||||
CloseRead() error
|
||||
}
|
||||
|
||||
// CloseableWriter is a writer that can close its writing end.
|
||||
type CloseableWriter interface {
|
||||
io.Writer
|
||||
|
||||
CloseWrite() error
|
||||
}
|
||||
|
||||
// Conn is an extension of net.Conn that can close its ends. This mostly
|
||||
// implies TCP connections.
|
||||
type Conn interface {
|
||||
net.Conn
|
||||
CloseableReader
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// This is a minimal package that contains _essentials_ of mtglib and its
|
||||
// complimentary packages. This is mostly required to comply some interfaces
|
||||
// between mtglib and its internals to avoid circular dependencies.
|
||||
//
|
||||
// This package should contain only bare minimum and mostly technical.
|
||||
package essentials
|
||||
Reference in New Issue
Block a user