Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read gets data from the clipboard. If multiple clipboard formats are supported, Read selects the first format that matches one of the given media types.
Each argument is a media type (e.g. "text/plain").
If an error is returned, then f will be less than 0. If no data was found, then the error will contain NoDataError. If no formats were given, then f will be less than 0, and err will be nil.
Types ¶
type Format ¶
type Format struct { // Name is a media type that indicates how to interpret Content. Name string // Content is the data to be set to the clipboard. Content []byte }
Format associates a media type with content.
type NoDataError ¶
type NoDataError struct {
// contains filtered or unexported fields
}
NoData indicates that no data was found for any of a number of given formats.
func (NoDataError) Error ¶
func (err NoDataError) Error() string
func (NoDataError) NotImplemented ¶
func (err NoDataError) NotImplemented() bool
NotImplemented indicates that the clipboard has no data because it is not implemented for the platform.
Click to show internal directories.
Click to hide internal directories.