Documentation ¶
Index ¶
- func DecodeFile(path string, d Decoder) error
- func DecodeFromString(s string, d Decoder) error
- func EncodeFile(path string, e Encoder) error
- func EncodeToString(e Encoder) (string, error)
- func Files(root string) ([]string, error)
- func FilesFilter(dir, glob string) ([]string, error)
- func Home() (string, error)
- func LoadJPEG(path string) (image.Image, error)
- func LoadPNG(path string) (image.Image, error)
- func MustEncodeToString(e Encoder) string
- func PathDoesNotExist(path string) bool
- func PathExists(path string) bool
- func ReadFile(path string, fn ReadFunc) error
- func ReadFromString(s string, fn ReadFunc) error
- func ReadLines(path string) ([]string, error)
- func SaveJPEG(path string, m image.Image) error
- func SavePNG(path string, m image.Image) error
- func WriteFile(path string, fn WriteFunc) error
- func WriteLines(path string, lines []string) error
- func WriteToString(fn WriteFunc) (string, error)
- type Decoder
- type Encoder
- type Imager
- type JSONer
- type Liner
- type PNGer
- type ReadFunc
- type WriteFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFile ¶
DecodeFile tries to open the file at the specified path and if successful it decodes d.
func DecodeFromString ¶
DecodeFromString d the bytes of s to fn.
func EncodeFile ¶
EncodeFile tries to open the file at the specified path and if successful it encodes e.
func EncodeToString ¶
EncodeToString returns the encoded string value
func FilesFilter ¶
Files gives back all the files in the specified directory that match the specified glob pattern.
func MustEncodeToString ¶
MustEncodeToString returns the encoded string value and panics if an error has occurred
func PathDoesNotExist ¶
PathDoesNotExist tests if the supplied does not exist.
func ReadFile ¶
ReadFile tries to open the file at the specified path and if successful it invokes fn.
func ReadFromString ¶
ReadFromString supplies the bytes of s to fn.
func WriteFile ¶
WriteFile tries to create the file at the specified path and if successful it invokes fn.
func WriteLines ¶
WriteLines writes lines to a text file.
func WriteToString ¶
WriteToString returns the string value of the data written to fn.
Types ¶
type Imager ¶
Imager describes a image encoder/decoder.
type Liner ¶
type Liner struct {
Lines []string
}