Documentation ¶
Overview ¶
Package misc provides general purpose utilities for rait
Index ¶
- Variables
- func LinkIn(links []Link, link Link) bool
- func LinkString(links []Link) (stringed []string)
- func NewAF(af string) string
- func NewLLAddr() *netlink.Addr
- func NewReadCloser(path string) (io.ReadCloser, error)
- func NewWriteCloser(path string) (io.WriteCloser, error)
- func ResolveBindAddress(af string, addrSpec string) net.IP
- func StringIn(list []string, item string) bool
- func UnmarshalHCL(path string, v interface{}) error
- func UnmarshalTOML(path string, v interface{}) error
- type Link
Constants ¶
This section is empty.
Variables ¶
View Source
var Bind bool
View Source
var IPNetAll = []net.IPNet{{IP: _4b[:], Mask: _4b[:]}, {IP: _16b[:], Mask: _16b[:]}}
IPNetALL is simply 0/0 plus ::/0
Functions ¶
func LinkString ¶
func NewLLAddr ¶
NewLLAddr generates a RFC 4862 compliant linklocal address, from a random mac address
func NewReadCloser ¶
func NewReadCloser(path string) (io.ReadCloser, error)
NewReadCloser returns a ReadCloser from the given path path can be a file system path, a http url, or "-" for stdin
func NewWriteCloser ¶
func NewWriteCloser(path string) (io.WriteCloser, error)
NewWriteCloser returns a WriteCloser from the given path path can be a file system path, or "-" for stdout
func UnmarshalHCL ¶
UnmarshalHCL decodes the hcl file read from path then unmarshal it into the given interface
func UnmarshalTOML ¶
UnmarshalTOML decodes the toml file read from path then unmarshal it into the given interface
Types ¶
Click to show internal directories.
Click to hide internal directories.