util

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2015 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortFileInfosByName

func SortFileInfosByName(fis []os.FileInfo)

SortFileInfosByName sorts fis by name, alphabetically.

func WriteKeyTempFile

func WriteKeyTempFile(namePrefix string, keyData []byte) (filename string, tmp *os.File, err error)

WriteKeyTempFile writes data to a temp file whose filename contains some function of namePrefix. On Linux, the temp file is unlinked and the filename by which to access it is /proc/self/fd/N, where N is the fd of the file. The caller should call the Remove method on the returned File when done using it.

Types

type FileInfo

type FileInfo struct {
	Name_    string
	Mode_    os.FileMode
	Size_    int64
	ModTime_ time.Time
	Sys_     interface{}
}

FileInfo implements os.FileInfo.

func (*FileInfo) IsDir

func (fi *FileInfo) IsDir() bool

func (*FileInfo) ModTime

func (fi *FileInfo) ModTime() time.Time

func (*FileInfo) Mode

func (fi *FileInfo) Mode() os.FileMode

func (*FileInfo) Name

func (fi *FileInfo) Name() string

func (*FileInfo) Size

func (fi *FileInfo) Size() int64

func (*FileInfo) Sys

func (fi *FileInfo) Sys() interface{}

type NopCloser

type NopCloser struct {
	io.ReadSeeker
}

NopCloser wraps an io.ReadSeeker to add a no-op Close method.

func (NopCloser) Close

func (nc NopCloser) Close() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL