misc

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package misc provides general purpose utilities for rait

Index

Constants

This section is empty.

Variables

View Source
var IPNetAll = []net.IPNet{{IP: net.IP{0, 0, 0, 0}, Mask: net.IPMask{0, 0, 0, 0}},
	{IP: net.IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
		Mask: net.IPMask{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}

Functions

func DecodeTOMLFromPath

func DecodeTOMLFromPath(path string, v interface{}) error

DecodeTOMLFromPath decodes the toml file read from path then unmarshal it into the given interface

func LinkLocalAddr

func LinkLocalAddr() *netlink.Addr

LinkLocalAddr generates a RFC 4862 compliant linklocal address, from a random mac address

func ReadCloserFromPath

func ReadCloserFromPath(path string) (io.ReadCloser, error)

ReadCloserFromPath returns a ReadCloser from the given path path can be a file system path, a http url, or "-" for stdin

func WriteCloserFromPath

func WriteCloserFromPath(path string) (io.WriteCloser, error)

WriteCloserFromPath returns a WriteCloser from the given path path can be a file system path, or "-" for stdout

Types

This section is empty.

Jump to

Keyboard shortcuts

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