Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotConvert = errors.New("cannot convert to Node")
View Source
var ErrSplatNode = errors.New("cannot splat non-DirNode")
Functions ¶
func ToNode ¶
ToNode creates a np.Node from a value.
The following conversions are available.
string -> file containing the string []byte -> file containing the data []T -> directory of nodes converted from T if the a child node does not return a name, the array index is used struct -> directory of fields tagged with `np:"name,opts"` available options are: write - the node represented by this field should be writable exec - the node represented by this field should be executable splat - applied to a Dir Node, adds the children of the Dir to the struct omitnil - don't list the node if it's nil The following options mark fields to be used for Stat() stat - Stat starts wth this value qid - used as value for Stat.Qid name - used as value for Stat.Name len - used as value for Stat.Len typ - used as value for Stat.Typ dev - used as value for Stat.Dev ver - used as value for Stat.Qid.Version atime - used as value for Stat.Atime mtime - used as value for Stat.Mtime uid - used as value for Stat.Uid gid - used as value for Stat.Gid muid - used as value for Stat.Muid
Types ¶
Click to show internal directories.
Click to hide internal directories.